fix PR3768, Clang does -D__STDC_HOSTED__=1, even if -ffreestanding is passed.

llvm-svn: 66474
This commit is contained in:
Chris Lattner 2009-03-09 21:50:12 +00:00
parent c2d4b62046
commit da248f4f30
1 changed files with 5 additions and 1 deletions

View File

@ -488,7 +488,11 @@ static void InitializePredefinedMacros(Preprocessor &PP,
else if (0) // STDC94 ?
DefineBuiltinMacro(Buf, "__STDC_VERSION__=199409L");
if (PP.getLangOptions().Freestanding)
DefineBuiltinMacro(Buf, "__STDC_HOSTED__=0");
else
DefineBuiltinMacro(Buf, "__STDC_HOSTED__=1");
if (PP.getLangOptions().ObjC1) {
DefineBuiltinMacro(Buf, "__OBJC__=1");
if (PP.getLangOptions().ObjCNonFragileABI)