aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-12-01 18:55:22 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-12-01 18:55:22 +0000
commitc1571453de3db2b26c15cc13115fac4ece84aa7c (patch)
tree3545a8d6940fcf8a4092f9f91ea505faf8c7a86a /lib/Lex/Preprocessor.cpp
parent5fd5468af403b6ab570a21eb59a004b265708799 (diff)
Add LangOptions marker for assembler-with-cpp mode and use to define
__ASSEMBLER__ properly. Patch from Roman Divacky (with minor formatting changes). Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60362 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r--lib/Lex/Preprocessor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp
index e9894fea4d..00d3d56e2e 100644
--- a/lib/Lex/Preprocessor.cpp
+++ b/lib/Lex/Preprocessor.cpp
@@ -431,7 +431,8 @@ static void InitializePredefinedMacros(Preprocessor &PP,
// These should all be defined in the preprocessor according to the
// current language configuration.
DefineBuiltinMacro(Buf, "__STDC__=1");
- //DefineBuiltinMacro(Buf, "__ASSEMBLER__=1");
+ if (PP.getLangOptions().AsmPreprocessor)
+ DefineBuiltinMacro(Buf, "__ASSEMBLER__=1");
if (PP.getLangOptions().C99 && !PP.getLangOptions().CPlusPlus)
DefineBuiltinMacro(Buf, "__STDC_VERSION__=199901L");
else if (0) // STDC94 ?