From e926523105dd2604ccd5c101605dea43c5269965 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Wed, 27 Jul 2011 20:29:46 +0000 Subject: [PATCH] CodeGen: rename CodeGenModule::Runtime to ObjCRuntime git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136254 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGRTTI.cpp | 2 +- lib/CodeGen/CodeGenModule.cpp | 18 +++++++++--------- lib/CodeGen/CodeGenModule.h | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/CodeGen/CGRTTI.cpp b/lib/CodeGen/CGRTTI.cpp index 0b9484b700..2e3d966ab4 100644 --- a/lib/CodeGen/CGRTTI.cpp +++ b/lib/CodeGen/CGRTTI.cpp @@ -982,7 +982,7 @@ llvm::Constant *CodeGenModule::GetAddrOfRTTIDescriptor(QualType Ty, } if (ForEH && Ty->isObjCObjectPointerType() && !Features.NeXTRuntime) { - return Runtime->GetEHType(Ty); + return ObjCRuntime->GetEHType(Ty); } return RTTIBuilder(*this).BuildTypeInfo(Ty); diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index ce32325aca..12f09b1c65 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -64,7 +64,7 @@ CodeGenModule::CodeGenModule(ASTContext &C, const CodeGenOptions &CGO, ABI(createCXXABI(*this)), Types(C, M, TD, getTargetCodeGenInfo().getABIInfo(), ABI, CGO), TBAA(0), - VTables(*this), Runtime(0), DebugInfo(0), ARCData(0), RRData(0), + VTables(*this), ObjCRuntime(0), DebugInfo(0), ARCData(0), RRData(0), CFConstantStringClassRef(0), ConstantStringClassRef(0), VMContext(M.getContext()), NSConcreteGlobalBlockDecl(0), NSConcreteStackBlockDecl(0), @@ -108,7 +108,7 @@ CodeGenModule::CodeGenModule(ASTContext &C, const CodeGenOptions &CGO, } CodeGenModule::~CodeGenModule() { - delete Runtime; + delete ObjCRuntime; delete &ABI; delete TBAA; delete DebugInfo; @@ -118,17 +118,17 @@ CodeGenModule::~CodeGenModule() { void CodeGenModule::createObjCRuntime() { if (!Features.NeXTRuntime) - Runtime = CreateGNUObjCRuntime(*this); + ObjCRuntime = CreateGNUObjCRuntime(*this); else - Runtime = CreateMacObjCRuntime(*this); + ObjCRuntime = CreateMacObjCRuntime(*this); } void CodeGenModule::Release() { EmitDeferred(); EmitCXXGlobalInitFunc(); EmitCXXGlobalDtorFunc(); - if (Runtime) - if (llvm::Function *ObjCInitFunction = Runtime->ModuleInitFunction()) + if (ObjCRuntime) + if (llvm::Function *ObjCInitFunction = ObjCRuntime->ModuleInitFunction()) AddGlobalCtor(ObjCInitFunction); EmitCtorList(GlobalCtors, "llvm.global_ctors"); EmitCtorList(GlobalDtors, "llvm.global_dtors"); @@ -2158,13 +2158,13 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) { } case Decl::ObjCProtocol: - Runtime->GenerateProtocol(cast(D)); + ObjCRuntime->GenerateProtocol(cast(D)); break; case Decl::ObjCCategoryImpl: // Categories have properties but don't support synthesize so we // can ignore them here. - Runtime->GenerateCategory(cast(D)); + ObjCRuntime->GenerateCategory(cast(D)); break; case Decl::ObjCImplementation: { @@ -2173,7 +2173,7 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) { Context.ResetObjCLayout(OMD->getClassInterface()); EmitObjCPropertyImplementations(OMD); EmitObjCIvarInitializations(OMD); - Runtime->GenerateClass(OMD); + ObjCRuntime->GenerateClass(OMD); break; } case Decl::ObjCMethod: { diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index 2642df73fc..318c3ea263 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/lib/CodeGen/CodeGenModule.h @@ -221,7 +221,7 @@ class CodeGenModule : public CodeGenTypeCache { CodeGenVTables VTables; friend class CodeGenVTables; - CGObjCRuntime* Runtime; + CGObjCRuntime* ObjCRuntime; CGDebugInfo* DebugInfo; ARCEntrypoints *ARCData; RREntrypoints *RRData; @@ -332,13 +332,13 @@ public: /// getObjCRuntime() - Return a reference to the configured /// Objective-C runtime. CGObjCRuntime &getObjCRuntime() { - if (!Runtime) createObjCRuntime(); - return *Runtime; + if (!ObjCRuntime) createObjCRuntime(); + return *ObjCRuntime; } /// hasObjCRuntime() - Return true iff an Objective-C runtime has /// been configured. - bool hasObjCRuntime() { return !!Runtime; } + bool hasObjCRuntime() { return !!ObjCRuntime; } /// getCXXABI() - Return a reference to the configured C++ ABI. CGCXXABI &getCXXABI() { return ABI; } -- 2.40.0