diff options
author | Chris Lattner <sabre@nondot.org> | 2008-06-26 17:26:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-06-26 17:26:01 +0000 |
commit | d86522a2c7722b85cac070178b6590093dd9d827 (patch) | |
tree | 919cd0400447f273772430b5a5fbf15c31efa85c /lib/Lex/Preprocessor.cpp | |
parent | 8429fca639bb4fbb6d589f85a2cc84513db4f748 (diff) |
clang uses the llvm backend, so define __llvm__ like llvm-gcc.
Additionally, define __clang__ so clients can predicate based on
clang features.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52788 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r-- | lib/Lex/Preprocessor.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index 8dac3f066f..32ee8f0c81 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/lib/Lex/Preprocessor.cpp @@ -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"); |