
These are identified by misc-include-cleaner. I've filtered out those that break builds. Also, I'm staying away from llvm-config.h, config.h, and Compiler.h, which likely cause platform- or compiler-specific build failures.
35 lines
1.2 KiB
C++
35 lines
1.2 KiB
C++
//===--- Xtensa.cpp - Implement Xtensa target feature support -------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file implements Xtensa TargetInfo objects.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "Xtensa.h"
|
|
#include "clang/Basic/Builtins.h"
|
|
#include "clang/Basic/MacroBuilder.h"
|
|
|
|
using namespace clang;
|
|
using namespace clang::targets;
|
|
|
|
void XtensaTargetInfo::getTargetDefines(const LangOptions &Opts,
|
|
MacroBuilder &Builder) const {
|
|
Builder.defineMacro("__xtensa__");
|
|
Builder.defineMacro("__XTENSA__");
|
|
if (BigEndian)
|
|
Builder.defineMacro("__XTENSA_EB__");
|
|
else
|
|
Builder.defineMacro("__XTENSA_EL__");
|
|
Builder.defineMacro("__XCHAL_HAVE_BE", BigEndian ? "1" : "0");
|
|
Builder.defineMacro("__XCHAL_HAVE_ABS"); // core arch
|
|
Builder.defineMacro("__XCHAL_HAVE_ADDX"); // core arch
|
|
Builder.defineMacro("__XCHAL_HAVE_L32R"); // core arch
|
|
}
|