diff options
author | Eric Fiselier <eric@efcs.ca> | 2019-05-29 03:15:36 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2019-05-29 03:15:36 +0000 |
commit | 86873839af7530176e3a062ecbf7edf74048922c (patch) | |
tree | e4fc7bc381fc6670c5819104d6db1a9ef7868a17 /lib | |
parent | 5240ba5698fc167c5f124994ec80eb1a896528fd (diff) | |
download | clang-86873839af7530176e3a062ecbf7edf74048922c.tar.gz |
Make __has_builtin work with __builtin_LINE and friends.
The source location builtins are implemented as keywords, but
__has_builtin should still report true for them.
This patch also fixes a test failure on systemz where the alignment
of string literals is 2 not 1.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361920 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Lex/PPMacroExpansion.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Lex/PPMacroExpansion.cpp b/lib/Lex/PPMacroExpansion.cpp index 4576f1a47e..72f8f48839 100644 --- a/lib/Lex/PPMacroExpansion.cpp +++ b/lib/Lex/PPMacroExpansion.cpp @@ -1620,6 +1620,10 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { .Case("__is_target_vendor", true) .Case("__is_target_os", true) .Case("__is_target_environment", true) + .Case("__builtin_LINE", true) + .Case("__builtin_FILE", true) + .Case("__builtin_FUNCTION", true) + .Case("__builtin_COLUMN", true) .Default(false); } }); |