Rename the GCC Objective-C runtime to gcc from gnu-fragile and the GNUstep
runtime to gnustep from gnu. Fix EH for the GCC runtime.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159684 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGException.cpp b/lib/CodeGen/CGException.cpp
index fb36715..2fdc74c 100644
--- a/lib/CodeGen/CGException.cpp
+++ b/lib/CodeGen/CGException.cpp
@@ -186,8 +186,8 @@
case ObjCRuntime::MacOSX:
case ObjCRuntime::iOS:
return EHPersonality::NeXT_ObjC;
- case ObjCRuntime::GNU:
- case ObjCRuntime::FragileGNU:
+ case ObjCRuntime::GNUstep:
+ case ObjCRuntime::GCC:
return EHPersonality::GNU_ObjC;
}
llvm_unreachable("bad runtime kind");
@@ -216,10 +216,11 @@
case ObjCRuntime::FragileMacOSX:
return getCXXPersonality(L);
- // The GNU runtime's personality function inherently doesn't support
+ // The GCC runtime's personality function inherently doesn't support
// mixed EH. Use the C++ personality just to avoid returning null.
- case ObjCRuntime::GNU:
- case ObjCRuntime::FragileGNU:
+ case ObjCRuntime::GCC:
+ return EHPersonality::GNU_ObjC;
+ case ObjCRuntime::GNUstep:
return EHPersonality::GNU_ObjCXX;
}
llvm_unreachable("bad runtime kind");
diff --git a/lib/CodeGen/CGObjCGNU.cpp b/lib/CodeGen/CGObjCGNU.cpp
index a949436..686fb05 100644
--- a/lib/CodeGen/CGObjCGNU.cpp
+++ b/lib/CodeGen/CGObjCGNU.cpp
@@ -2666,10 +2666,10 @@
CGObjCRuntime *
clang::CodeGen::CreateGNUObjCRuntime(CodeGenModule &CGM) {
switch (CGM.getLangOpts().ObjCRuntime.getKind()) {
- case ObjCRuntime::GNU:
+ case ObjCRuntime::GNUstep:
return new CGObjCGNUstep(CGM);
- case ObjCRuntime::FragileGNU:
+ case ObjCRuntime::GCC:
return new CGObjCGCC(CGM);
case ObjCRuntime::FragileMacOSX:
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index 3eb5d52..3b7c238 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -6389,8 +6389,8 @@
case ObjCRuntime::iOS:
return new CGObjCNonFragileABIMac(CGM);
- case ObjCRuntime::GNU:
- case ObjCRuntime::FragileGNU:
+ case ObjCRuntime::GNUstep:
+ case ObjCRuntime::GCC:
llvm_unreachable("these runtimes are not Mac runtimes");
}
llvm_unreachable("bad runtime");
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index ef20cf4..bba3e7c 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -138,8 +138,8 @@
// This is just isGNUFamily(), but we want to force implementors of
// new ABIs to decide how best to do this.
switch (LangOpts.ObjCRuntime.getKind()) {
- case ObjCRuntime::GNU:
- case ObjCRuntime::FragileGNU:
+ case ObjCRuntime::GNUstep:
+ case ObjCRuntime::GCC:
ObjCRuntime = CreateGNUObjCRuntime(*this);
return;
@@ -546,7 +546,7 @@
// If ObjC exceptions are enabled, this depends on the ABI.
if (LangOpts.ObjCExceptions) {
- if (LangOpts.ObjCRuntime.isFragile()) return false;
+ return LangOpts.ObjCRuntime.hasUnwindExceptions();
}
return true;