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, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 80f56e9bff3..485beab7403 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -2269,7 +2269,7 @@ void CodeGenModule::EmitAliasDefinition(GlobalDecl GD) {
llvm::PointerType::getUnqual(DeclTy), 0);
// Create the new alias itself, but don't set a name yet.
- auto *GA = new llvm::GlobalAlias(
+ auto *GA = llvm::GlobalAlias::create(
cast<llvm::PointerType>(Aliasee->getType())->getElementType(), 0,
llvm::Function::ExternalLinkage, "",
&getGlobalObjectInExpr(Diags, AA, Aliasee));
@@ -3197,8 +3197,8 @@ void CodeGenModule::EmitStaticExternCAliases() {
IdentifierInfo *Name = I->first;
llvm::GlobalValue *Val = I->second;
if (Val && !getModule().getNamedValue(Name->getName()))
- addUsedGlobal(new llvm::GlobalAlias(Name->getName(),
- cast<llvm::GlobalObject>(Val)));
+ addUsedGlobal(llvm::GlobalAlias::create(Name->getName(),
+ cast<llvm::GlobalObject>(Val)));
}
}
OpenPOWER on IntegriCloud