summaryrefslogtreecommitdiff
path: root/lib/IR/Core.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/IR/Core.cpp')
-rw-r--r--lib/IR/Core.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/IR/Core.cpp b/lib/IR/Core.cpp
index dc3d6f34c8..27ce503e1c 100644
--- a/lib/IR/Core.cpp
+++ b/lib/IR/Core.cpp
@@ -1489,9 +1489,9 @@ void LLVMSetExternallyInitialized(LLVMValueRef GlobalVar, LLVMBool IsExtInit) {
LLVMValueRef LLVMAddAlias(LLVMModuleRef M, LLVMTypeRef Ty, LLVMValueRef Aliasee,
const char *Name) {
auto *PTy = cast<PointerType>(unwrap(Ty));
- return wrap(new GlobalAlias(PTy->getElementType(), PTy->getAddressSpace(),
- GlobalValue::ExternalLinkage, Name,
- unwrap<GlobalObject>(Aliasee), unwrap(M)));
+ return wrap(GlobalAlias::create(PTy->getElementType(), PTy->getAddressSpace(),
+ GlobalValue::ExternalLinkage, Name,
+ unwrap<GlobalObject>(Aliasee), unwrap(M)));
}
/*--.. Operations on functions .............................................--*/