summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r--clang/lib/Lex/Preprocessor.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp
index 8dac3f066fa..32ee8f0c817 100644
--- a/clang/lib/Lex/Preprocessor.cpp
+++ b/clang/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");
OpenPOWER on IntegriCloud