diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index dd8c384d13171..8b2fa5eaf5ba1 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -2028,22 +2028,6 @@ CodeGenModule::getMostBaseClasses(const CXXRecordDecl *RD) { return MostBases.takeVector(); } -llvm::GlobalVariable * -CodeGenModule::GetOrCreateRTTIProxyGlobalVariable(llvm::Constant *Addr) { - auto It = RTTIProxyMap.find(Addr); - if (It != RTTIProxyMap.end()) - return It->second; - - auto *FTRTTIProxy = new llvm::GlobalVariable( - TheModule, Addr->getType(), - /*isConstant=*/true, llvm::GlobalValue::PrivateLinkage, Addr, - "__llvm_rtti_proxy"); - FTRTTIProxy->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global); - - RTTIProxyMap[Addr] = FTRTTIProxy; - return FTRTTIProxy; -} - void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, llvm::Function *F) { llvm::AttrBuilder B(F->getContext()); diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 43d61b40f76b4..2d2cce8337195 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -590,8 +590,6 @@ class CodeGenModule : public CodeGenTypeCache { MetadataTypeMap VirtualMetadataIdMap; MetadataTypeMap GeneralizedMetadataIdMap; - llvm::DenseMap RTTIProxyMap; - // Helps squashing blocks of TopLevelStmtDecl into a single llvm::Function // when used with -fincremental-extensions. std::pair, const TopLevelStmtDecl *> @@ -1503,9 +1501,6 @@ class CodeGenModule : public CodeGenTypeCache { std::vector getMostBaseClasses(const CXXRecordDecl *RD); - llvm::GlobalVariable * - GetOrCreateRTTIProxyGlobalVariable(llvm::Constant *Addr); - /// Get the declaration of std::terminate for the platform. llvm::FunctionCallee getTerminateFn();