diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-18 20:31:57 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-18 20:31:57 +0000 |
commit | 48be3801ca729cf2afea060fdb08a479b49ab440 (patch) | |
tree | 33769ad8233b7dc453cdd9b66366732477c57d50 /lib/Lex/TokenLexer.cpp | |
parent | a88620c0d15d380975eb2c4c9251cd6ff8d2aa64 (diff) |
constructs like:
#define Y X ## .
Y
are ok in .S files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67231 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/TokenLexer.cpp')
-rw-r--r-- | lib/Lex/TokenLexer.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Lex/TokenLexer.cpp b/lib/Lex/TokenLexer.cpp index 8178168ef5..1935914e0e 100644 --- a/lib/Lex/TokenLexer.cpp +++ b/lib/Lex/TokenLexer.cpp @@ -444,9 +444,10 @@ bool TokenLexer::PasteTokens(Token &Tok) { return true; } - // TODO: If not in assembler language mode. - PP.Diag(PasteOpLoc, diag::err_pp_bad_paste) - << std::string(Buffer.begin(), Buffer.end()-1); + // Do not emit the warning when preprocessing assembler code. + if (!PP.getLangOptions().AsmPreprocessor) + PP.Diag(PasteOpLoc, diag::err_pp_bad_paste) + << std::string(Buffer.begin(), Buffer.end()-1); return false; } |