summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/InitPreprocessor.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
commit03256c32ffbd6101347b3926a1a7883f9c16de7d (patch)
treea4ac9781da97a26ed63628c6abedf7a566870b28 /clang/lib/Frontend/InitPreprocessor.cpp
parentdbb58d297434d58fbe0d35e691ee147bdd9c09c0 (diff)
downloadbcm5719-llvm-03256c32ffbd6101347b3926a1a7883f9c16de7d.tar.gz
bcm5719-llvm-03256c32ffbd6101347b3926a1a7883f9c16de7d.zip
More clang support for darwin tls. Add a __has_feature macro and
target specific preprocessor define as well. llvm-svn: 106715
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
-rw-r--r--clang/lib/Frontend/InitPreprocessor.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp
index c9c76e5f1f3..ab0e7067a8e 100644
--- a/clang/lib/Frontend/InitPreprocessor.cpp
+++ b/clang/lib/Frontend/InitPreprocessor.cpp
@@ -460,6 +460,10 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
if (FEOpts.ProgramAction == frontend::RunAnalysis)
Builder.defineMacro("__clang_analyzer__");
+ // Define __HAS_TLS__ if the target supports it.
+ if (TI.isTLSSupported())
+ Builder.defineMacro("__HAS_TLS__");
+
// Get other target #defines.
TI.getTargetDefines(LangOpts, Builder);
}
OpenPOWER on IntegriCloud