diff options
author | Chris Lattner <sabre@nondot.org> | 2009-02-05 07:19:24 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-02-05 07:19:24 +0000 |
commit | d427ad4cceab4481be0ac5cc2a190148ccc181e2 (patch) | |
tree | 80a44697aef5a7d97ebc05350bdd2b03d1215805 /lib/Lex/Preprocessor.cpp | |
parent | 13e81737a433b23f8c662d10d1d57356122a8caa (diff) |
fix some differences between apple gcc and clang on darwin/x86-32.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63846 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r-- | lib/Lex/Preprocessor.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index 3861e7d320..14bddd6826 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/lib/Lex/Preprocessor.cpp @@ -406,6 +406,8 @@ static void DefineFloatMacros(std::vector<char> &Buf, const char *Prefix, DefineBuiltinMacro(Buf, MacroBuf); sprintf(MacroBuf, "__%s_MIN__=%s", Prefix, Min); DefineBuiltinMacro(Buf, MacroBuf); + sprintf(MacroBuf, "__%s_HAS_DENORM__=1", Prefix); + DefineBuiltinMacro(Buf, MacroBuf); } @@ -571,8 +573,10 @@ static void InitializePredefinedMacros(Preprocessor &PP, DefineBuiltinMacro(Buf, "__PTRDIFF_TYPE__=long int"); else if (TI.getPtrDiffType(0) == TargetInfo::UnsignedInt) DefineBuiltinMacro(Buf, "__PTRDIFF_TYPE__=unsigned int"); - else + else { + assert(TI.getPtrDiffType(0) == TargetInfo::SignedInt); DefineBuiltinMacro(Buf, "__PTRDIFF_TYPE__=int"); + } if (TI.getSizeType() == TargetInfo::UnsignedLongLong) DefineBuiltinMacro(Buf, "__SIZE_TYPE__=unsigned long long int"); @@ -586,8 +590,10 @@ static void InitializePredefinedMacros(Preprocessor &PP, DefineBuiltinMacro(Buf, "__SIZE_TYPE__=unsigned int"); else if (TI.getSizeType() == TargetInfo::SignedInt) DefineBuiltinMacro(Buf, "__SIZE_TYPE__=int"); - else + else { + assert(TI.getPtrDiffType(0) == TargetInfo::UnsignedShort); DefineBuiltinMacro(Buf, "__SIZE_TYPE__=unsigned short"); + } DefineFloatMacros(Buf, "FLT", &TI.getFloatFormat()); DefineFloatMacros(Buf, "DBL", &TI.getDoubleFormat()); |