[PATCH] D19693: [Clang][Darwin] Define __ARM_DWARF_EH__ for WatchABI
Chris Bieneman via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 28 14:53:39 PDT 2016
beanz created this revision.
beanz added a reviewer: t.p.northover.
beanz added a subscriber: cfe-commits.
Herald added subscribers: rengolin, aemerson.
The Darwin armv7k ABI uses Dwarf EH, so we need to set the OS define correctly. Without this the gcc_personality fails to build.
http://reviews.llvm.org/D19693
Files:
lib/Basic/Targets.cpp
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";
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19693.55498.patch
Type: text/x-patch
Size: 1606 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160428/f15ff5f6/attachment.bin>
More information about the cfe-commits
mailing list