}
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;
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.