forked from OSchip/llvm-project
[clang][XCore] Define __xcore__ for XCore target.
The headers shipped with the XMOS XCore compiler expect __xcore__ to be defined. The __XS1B__ macro, already defined, is for the default subtarget. No other targets affected.
This commit is contained in:
parent
ff0ddd5ce4
commit
e7b6c0f398
|
@ -28,6 +28,7 @@ const Builtin::Info XCoreTargetInfo::BuiltinInfo[] = {
|
|||
|
||||
void XCoreTargetInfo::getTargetDefines(const LangOptions &Opts,
|
||||
MacroBuilder &Builder) const {
|
||||
Builder.defineMacro("__xcore__");
|
||||
Builder.defineMacro("__XS1B__");
|
||||
}
|
||||
|
||||
|
|
|
@ -1468,6 +1468,7 @@
|
|||
// XCORE:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
|
||||
// XCORE:#define __LITTLE_ENDIAN__ 1
|
||||
// XCORE:#define __XS1B__ 1
|
||||
// XCORE:#define __xcore__ 1
|
||||
//
|
||||
// RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=wasm32-unknown-unknown \
|
||||
// RUN: < /dev/null \
|
||||
|
|
Loading…
Reference in New Issue