From 1faa89f9c619e4b2411fab4af7e22ee7a2bd9009 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Sat, 5 Feb 2011 04:35:53 +0000 Subject: Re-land r124768, with a fix for PR9130. We now emit everything except unused implicit virtual member functions when building the vtable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124935 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGCXX.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/CGCXX.cpp') diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp index 9cb85954df..b217729e6e 100644 --- a/lib/CodeGen/CGCXX.cpp +++ b/lib/CodeGen/CGCXX.cpp @@ -227,7 +227,8 @@ CodeGenModule::GetAddrOfCXXConstructor(const CXXConstructorDecl *D, const llvm::FunctionType *FTy = getTypes().GetFunctionType(getTypes().getFunctionInfo(D, Type), FPT->isVariadic()); - return cast(GetOrCreateLLVMFunction(Name, FTy, GD)); + return cast(GetOrCreateLLVMFunction(Name, FTy, GD, + /*ForVTable=*/false)); } void CodeGenModule::EmitCXXDestructors(const CXXDestructorDecl *D) { @@ -284,7 +285,8 @@ CodeGenModule::GetAddrOfCXXDestructor(const CXXDestructorDecl *D, const llvm::FunctionType *FTy = getTypes().GetFunctionType(getTypes().getFunctionInfo(D, Type), false); - return cast(GetOrCreateLLVMFunction(Name, FTy, GD)); + return cast(GetOrCreateLLVMFunction(Name, FTy, GD, + /*ForVTable=*/false)); } static llvm::Value *BuildVirtualCall(CodeGenFunction &CGF, uint64_t VTableIndex, -- cgit v1.2.3-70-g09d2