Index: lib/Basic/Targets.cpp =================================================================== --- lib/Basic/Targets.cpp +++ lib/Basic/Targets.cpp @@ -208,6 +208,10 @@ if (Triple.isOSDarwin()) Builder.defineMacro("__MACH__"); + // The Watch ABI uses Dwarf EH. + if(Triple.isWatchABI()) + Builder.defineMacro("__ARM_DWARF_EH__"); + PlatformMinVersion = VersionTuple(Maj, Min, Rev); } @@ -4931,7 +4935,7 @@ Builder.defineMacro("__ARM_FP16_ARGS", "1"); // ACLE 6.5.3 Fused multiply-accumulate (FMA) - if (ArchVersion >= 7 && (FPU & VFP4FPU)) + if (ArchVersion >= 7 && (CPUProfile != "M" || CPUAttr == "7EM")) Builder.defineMacro("__ARM_FEATURE_FMA", "1"); // Subtarget options. @@ -4948,11 +4952,10 @@ if (!getTriple().isOSDarwin() && !getTriple().isOSWindows()) Builder.defineMacro("__ARM_EABI__"); Builder.defineMacro("__ARM_PCS", "1"); - } - if ((!SoftFloat && !SoftFloatABI) || ABI == "aapcs-vfp" || - ABI == "aapcs16") - Builder.defineMacro("__ARM_PCS_VFP", "1"); + if ((!SoftFloat && !SoftFloatABI) || ABI == "aapcs-vfp") + Builder.defineMacro("__ARM_PCS_VFP", "1"); + } if (SoftFloat) Builder.defineMacro("__SOFTFP__"); @@ -6549,16 +6552,6 @@ .Default(false); } - CallingConvCheckResult checkCallingConvention(CallingConv CC) const override { - switch (CC) { - case CC_C: - case CC_Swift: - return CCCR_OK; - default: - return CCCR_Warning; - } - } - StringRef getABI() const override { if (HasVector) return "vector";