More clang support for darwin tls. Add a __has_feature macro and

target specific preprocessor define as well.

llvm-svn: 106715
This commit is contained in:
Eric Christopher
2010-06-24 02:02:00 +00:00
parent dbb58d2974
commit 03256c32ff
3 changed files with 7 additions and 1 deletions

View File

@@ -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);
}