aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/PPMacroExpansion.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2010-06-24 02:02:00 +0000
committerEric Christopher <echristo@apple.com>2010-06-24 02:02:00 +0000
commit1f84f8d970a673e487b40d341cd3e8d52ca9cc22 (patch)
tree89b3f3bba1a2fe8c5f6288dd48dbc43bc5ea0b38 /lib/Lex/PPMacroExpansion.cpp
parent564360be450b319aeafc26698be9811837bfb826 (diff)
More clang support for darwin tls. Add a __has_feature macro and
target specific preprocessor define as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106715 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PPMacroExpansion.cpp')
-rw-r--r--lib/Lex/PPMacroExpansion.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Lex/PPMacroExpansion.cpp b/lib/Lex/PPMacroExpansion.cpp
index 71bb4fcf68..ebf606e940 100644
--- a/lib/Lex/PPMacroExpansion.cpp
+++ b/lib/Lex/PPMacroExpansion.cpp
@@ -17,6 +17,7 @@
#include "clang/Lex/MacroInfo.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/FileManager.h"
+#include "clang/Basic/TargetInfo.h"
#include "clang/Lex/LexDiagnostic.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/raw_ostream.h"
@@ -510,6 +511,7 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) {
//.Case("cxx_nullptr", false)
//.Case("cxx_rvalue_references", false)
//.Case("cxx_variadic_templates", false)
+ .Case("tls", PP.getTargetInfo().isTLSSupported())
.Default(false);
}