summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-06-09 02:30:12 +0000
committerAnders Carlsson <andersca@mac.com>2010-06-09 02:30:12 +0000
commit09b5fe68ab35484cae30250abc322f5fd33e6059 (patch)
tree7e00c22ed3c154e45bf64cdabd7d1f598535678a
parentd4ce4e4bc0137204a865cdf228cd16a41406d16f (diff)
downloadbcm5719-llvm-09b5fe68ab35484cae30250abc322f5fd33e6059.tar.gz
bcm5719-llvm-09b5fe68ab35484cae30250abc322f5fd33e6059.zip
More mangling cleanup.
llvm-svn: 105672
-rw-r--r--clang/lib/CodeGen/CGCXX.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGCXX.cpp b/clang/lib/CodeGen/CGCXX.cpp
index 60f1f6f7eba..137fbc0e876 100644
--- a/clang/lib/CodeGen/CGCXX.cpp
+++ b/clang/lib/CodeGen/CGCXX.cpp
@@ -218,8 +218,10 @@ void CodeGenModule::EmitCXXConstructor(const CXXConstructorDecl *D,
llvm::GlobalValue *
CodeGenModule::GetAddrOfCXXConstructor(const CXXConstructorDecl *D,
CXXCtorType Type) {
+ GlobalDecl GD(D, Type);
+
MangleBuffer Name;
- getMangledCXXCtorName(Name, D, Type);
+ getMangledName(Name, GD);
if (llvm::GlobalValue *V = GetGlobalValue(Name))
return V;
@@ -227,8 +229,7 @@ CodeGenModule::GetAddrOfCXXConstructor(const CXXConstructorDecl *D,
const llvm::FunctionType *FTy =
getTypes().GetFunctionType(getTypes().getFunctionInfo(D, Type),
FPT->isVariadic());
- return cast<llvm::Function>(
- GetOrCreateLLVMFunction(Name, FTy, GlobalDecl(D, Type)));
+ return cast<llvm::Function>(GetOrCreateLLVMFunction(Name, FTy, GD));
}
void CodeGenModule::getMangledName(MangleBuffer &Buffer, const BlockDecl *BD) {
@@ -286,16 +287,17 @@ void CodeGenModule::EmitCXXDestructor(const CXXDestructorDecl *D,
llvm::GlobalValue *
CodeGenModule::GetAddrOfCXXDestructor(const CXXDestructorDecl *D,
CXXDtorType Type) {
+ GlobalDecl GD(D, Type);
+
MangleBuffer Name;
- getMangledCXXDtorName(Name, D, Type);
+ getMangledName(Name, GD);
if (llvm::GlobalValue *V = GetGlobalValue(Name))
return V;
const llvm::FunctionType *FTy =
getTypes().GetFunctionType(getTypes().getFunctionInfo(D, Type), false);
- return cast<llvm::Function>(
- GetOrCreateLLVMFunction(Name, FTy, GlobalDecl(D, Type)));
+ return cast<llvm::Function>(GetOrCreateLLVMFunction(Name, FTy, GD));
}
void CodeGenModule::getMangledCXXDtorName(MangleBuffer &Name,
OpenPOWER on IntegriCloud