summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index b259a5dc2cf..4cd046d74ed 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -630,7 +630,8 @@ llvm::Constant *CodeGenModule::GetAddrOfFunction(const FunctionDecl *D,
}
llvm::Function *F = llvm::Function::Create(cast<llvm::FunctionType>(Ty),
llvm::Function::ExternalLinkage,
- MangledName, &getModule());
+ "", &getModule());
+ F->setName(MangledName);
if (ShouldSetAttributes)
SetFunctionAttributes(D, F);
Entry = F;
@@ -677,8 +678,9 @@ llvm::Constant *CodeGenModule::GetAddrOfGlobalVar(const VarDecl *D,
llvm::GlobalVariable *GV =
new llvm::GlobalVariable(Ty, false,
llvm::GlobalValue::ExternalLinkage,
- 0, MangledName, &getModule(),
+ 0, "", &getModule(),
0, ASTTy.getAddressSpace());
+ GV->setName(MangledName);
// Handle things which are present even on external declarations.
OpenPOWER on IntegriCloud