clang uses the llvm backend, so define __llvm__ like llvm-gcc.

Additionally, define __clang__ so clients can predicate based on
clang features.

llvm-svn: 52788
This commit is contained in:
Chris Lattner 2008-06-26 17:26:01 +00:00
parent 1aab7a5b2a
commit d1224b2493
1 changed files with 3 additions and 0 deletions

View File

@ -414,6 +414,9 @@ static void InitializePredefinedMacros(Preprocessor &PP,
// Get the target #defines.
PP.getTargetInfo().getTargetDefines(Buf);
DefineBuiltinMacro(Buf, "__llvm__=1"); // LLVM Backend
DefineBuiltinMacro(Buf, "__clang__=1"); // Clang Frontend
// Compiler set macros.
DefineBuiltinMacro(Buf, "__APPLE_CC__=5250");