diff options
author | Eric Christopher <echristo@apple.com> | 2010-06-24 02:02:00 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2010-06-24 02:02:00 +0000 |
commit | 1f84f8d970a673e487b40d341cd3e8d52ca9cc22 (patch) | |
tree | 89b3f3bba1a2fe8c5f6288dd48dbc43bc5ea0b38 /lib/Frontend/InitPreprocessor.cpp | |
parent | 564360be450b319aeafc26698be9811837bfb826 (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/Frontend/InitPreprocessor.cpp')
-rw-r--r-- | lib/Frontend/InitPreprocessor.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp index c9c76e5f1f..ab0e7067a8 100644 --- a/lib/Frontend/InitPreprocessor.cpp +++ b/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); } |