static void getDarwinDefines(std::vector<char> &Defs, const char *Triple) {
Define(Defs, "__APPLE__");
Define(Defs, "__MACH__");
+ Define(Defs, "OBJC_NEW_PROPERTIES");
+
+ // FIXME: OBJC_ZEROCOST_EXCEPTIONS when using zero cost eh.
// Figure out which "darwin number" the target triple is. "darwin9" -> 10.5.
unsigned Maj, Min;
DarwinI386TargetInfo(const std::string& triple) : X86_32TargetInfo(triple) {
LongDoubleWidth = 128;
LongDoubleAlign = 128;
+ PtrDiffType = SignedInt;
DescriptionString = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-"
"i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-"
"a0:0:64-f80:128:128";
DefineBuiltinMacro(Buf, MacroBuf);
sprintf(MacroBuf, "__%s_MIN__=%s", Prefix, Min);
DefineBuiltinMacro(Buf, MacroBuf);
+ sprintf(MacroBuf, "__%s_HAS_DENORM__=1", Prefix);
+ DefineBuiltinMacro(Buf, MacroBuf);
}
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");
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());