diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Basic/ObjCRuntime.cpp | 12 | ||||
-rw-r--r-- | lib/CodeGen/CGException.cpp | 11 | ||||
-rw-r--r-- | lib/CodeGen/CGObjCGNU.cpp | 4 | ||||
-rw-r--r-- | lib/CodeGen/CGObjCMac.cpp | 4 | ||||
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 6 | ||||
-rw-r--r-- | lib/Driver/ToolChain.cpp | 2 | ||||
-rw-r--r-- | lib/Driver/Tools.cpp | 2 |
7 files changed, 21 insertions, 20 deletions
diff --git a/lib/Basic/ObjCRuntime.cpp b/lib/Basic/ObjCRuntime.cpp index d66da0706f..0f30bfaa2c 100644 --- a/lib/Basic/ObjCRuntime.cpp +++ b/lib/Basic/ObjCRuntime.cpp @@ -30,8 +30,8 @@ raw_ostream &clang::operator<<(raw_ostream &out, const ObjCRuntime &value) { case ObjCRuntime::MacOSX: out << "macosx"; break; case ObjCRuntime::FragileMacOSX: out << "macosx-fragile"; break; case ObjCRuntime::iOS: out << "ios"; break; - case ObjCRuntime::GNU: out << "gnu"; break; - case ObjCRuntime::FragileGNU: out << "gnu-fragile"; break; + case ObjCRuntime::GNUstep: out << "gnustep"; break; + case ObjCRuntime::GCC: out << "gcc"; break; } if (value.getVersion() > VersionTuple(0)) { out << '-' << value.getVersion(); @@ -60,10 +60,10 @@ bool ObjCRuntime::tryParse(StringRef input) { kind = ObjCRuntime::FragileMacOSX; } else if (runtimeName == "ios") { kind = ObjCRuntime::iOS; - } else if (runtimeName == "gnu") { - kind = ObjCRuntime::GNU; - } else if (runtimeName == "gnu-fragile") { - kind = ObjCRuntime::FragileGNU; + } else if (runtimeName == "gnustep") { + kind = ObjCRuntime::GNUstep; + } else if (runtimeName == "gcc") { + kind = ObjCRuntime::GCC; } else { return true; } diff --git a/lib/CodeGen/CGException.cpp b/lib/CodeGen/CGException.cpp index fb36715364..2fdc74ce6d 100644 --- a/lib/CodeGen/CGException.cpp +++ b/lib/CodeGen/CGException.cpp @@ -186,8 +186,8 @@ static const EHPersonality &getObjCPersonality(const LangOptions &L) { 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 @@ static const EHPersonality &getObjCXXPersonality(const LangOptions &L) { 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 a949436e85..686fb051b7 100644 --- a/lib/CodeGen/CGObjCGNU.cpp +++ b/lib/CodeGen/CGObjCGNU.cpp @@ -2666,10 +2666,10 @@ llvm::Value *CGObjCGNU::EmitIvarOffset(CodeGenFunction &CGF, 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 3eb5d5291d..3b7c238a8d 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -6389,8 +6389,8 @@ CodeGen::CreateMacObjCRuntime(CodeGen::CodeGenModule &CGM) { 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 ef20cf4556..bba3e7c5f7 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -138,8 +138,8 @@ void CodeGenModule::createObjCRuntime() { // 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 @@ static bool hasUnwindExceptions(const LangOptions &LangOpts) { // 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; diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp index 21aefb6439..48ed044c8f 100644 --- a/lib/Driver/ToolChain.cpp +++ b/lib/Driver/ToolChain.cpp @@ -50,7 +50,7 @@ bool ToolChain::HasNativeLLVMSupport() const { } ObjCRuntime ToolChain::getDefaultObjCRuntime(bool isNonFragile) const { - return ObjCRuntime(isNonFragile ? ObjCRuntime::GNU : ObjCRuntime::FragileGNU, + return ObjCRuntime(isNonFragile ? ObjCRuntime::GNUstep : ObjCRuntime::GCC, VersionTuple()); } diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 601ea54c29..01792ae11f 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -2934,7 +2934,7 @@ ObjCRuntime Clang::AddObjCRuntimeArgs(const ArgList &args, // -fgnu-runtime } else { assert(runtimeArg->getOption().matches(options::OPT_fgnu_runtime)); - runtime = ObjCRuntime(ObjCRuntime::GNU, VersionTuple()); + runtime = ObjCRuntime(ObjCRuntime::GCC, VersionTuple()); } cmdArgs.push_back(args.MakeArgString( |