summaryrefslogtreecommitdiffstats
path: root/clang/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
commit1f3d7849a892fc77bbbdf5cd8a7ea2ac87c4f1c9 (patch)
treeb2e636b4a8a6c7f2206df1250a383f30730da496 /clang/lib/Lex/Preprocessor.cpp
parentc12ce19595ec604ff050feed4efaa7b3fc15953b (diff)
downloadbcm5719-llvm-1f3d7849a892fc77bbbdf5cd8a7ea2ac87c4f1c9.tar.gz
bcm5719-llvm-1f3d7849a892fc77bbbdf5cd8a7ea2ac87c4f1c9.zip
Add LangOptions marker for assembler-with-cpp mode and use to define
__ASSEMBLER__ properly. Patch from Roman Divacky (with minor formatting changes). Thanks! llvm-svn: 60362
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r--clang/lib/Lex/Preprocessor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp
index e9894fea4d5..00d3d56e2e8 100644
--- a/clang/lib/Lex/Preprocessor.cpp
+++ b/clang/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 ?
OpenPOWER on IntegriCloud