summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCXX.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-05-12 21:21:08 +0000
committerChris Lattner <sabre@nondot.org>2009-05-12 21:21:08 +0000
commite0be0dfcedb709915ec3832ca1b89ecb4c67ba41 (patch)
tree5a76ec036c110e5a5cd7596cea3677dcaf357d54 /clang/lib/CodeGen/CGCXX.cpp
parentd035ebda2f798dca978715d5c53d9d8e8ae69a6d (diff)
downloadbcm5719-llvm-e0be0dfcedb709915ec3832ca1b89ecb4c67ba41.tar.gz
bcm5719-llvm-e0be0dfcedb709915ec3832ca1b89ecb4c67ba41.zip
push GlobalDecl through enough of the CodeGenModule interfaces
to allow us to support generation of deferred ctors/dtors. It looks like codegen isn't emitting a call to the dtor in member-functions.cpp:test2, but when it does, its body should get emitted. llvm-svn: 71594
Diffstat (limited to 'clang/lib/CodeGen/CGCXX.cpp')
-rw-r--r--clang/lib/CodeGen/CGCXX.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGCXX.cpp b/clang/lib/CodeGen/CGCXX.cpp
index f4eae6678f3..4c2faf0a607 100644
--- a/clang/lib/CodeGen/CGCXX.cpp
+++ b/clang/lib/CodeGen/CGCXX.cpp
@@ -109,7 +109,7 @@ RValue CodeGenFunction::EmitCXXMemberCallExpr(const CXXMemberCallExpr *CE) {
const llvm::Type *Ty =
CGM.getTypes().GetFunctionType(CGM.getTypes().getFunctionInfo(MD),
FPT->isVariadic());
- llvm::Constant *Callee = CGM.GetAddrOfFunction(MD, Ty);
+ llvm::Constant *Callee = CGM.GetAddrOfFunction(GlobalDecl(MD), Ty);
llvm::Value *This;
@@ -204,8 +204,8 @@ CodeGenModule::GetAddrOfCXXConstructor(const CXXConstructorDecl *D,
getTypes().GetFunctionType(getTypes().getFunctionInfo(D), false);
const char *Name = getMangledCXXCtorName(D, Type);
-
- return cast<llvm::Function>(GetOrCreateLLVMFunction(Name, FTy, D));
+ return cast<llvm::Function>(
+ GetOrCreateLLVMFunction(Name, FTy, GlobalDecl(D, Type)));
}
const char *CodeGenModule::getMangledCXXCtorName(const CXXConstructorDecl *D,
@@ -245,7 +245,8 @@ CodeGenModule::GetAddrOfCXXDestructor(const CXXDestructorDecl *D,
getTypes().GetFunctionType(getTypes().getFunctionInfo(D), false);
const char *Name = getMangledCXXDtorName(D, Type);
- return cast<llvm::Function>(GetOrCreateLLVMFunction(Name, FTy, D));
+ return cast<llvm::Function>(
+ GetOrCreateLLVMFunction(Name, FTy, GlobalDecl(D, Type)));
}
const char *CodeGenModule::getMangledCXXDtorName(const CXXDestructorDecl *D,
OpenPOWER on IntegriCloud