aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r--lib/Lex/Preprocessor.cpp3
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");