diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-02-23 21:51:06 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-02-23 21:51:06 +0000 |
| commit | 993502eafd8f108d266c21726b2f628fe50628e6 (patch) | |
| tree | 005c8d923af2a423451eb2e70b92efcbb369271d /llvm/lib/IR | |
| parent | 006c490ba8e26c3f34ea8efc34ad0e983d5e3107 (diff) | |
| download | bcm5719-llvm-993502eafd8f108d266c21726b2f628fe50628e6.tar.gz bcm5719-llvm-993502eafd8f108d266c21726b2f628fe50628e6.zip | |
Fix invalid cast.
Fixes PR22525.
Patch by Ben Longbons with testcase by me.
llvm-svn: 230271
Diffstat (limited to 'llvm/lib/IR')
| -rw-r--r-- | llvm/lib/IR/Core.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp index 6303e4548bf..f007616a1c3 100644 --- a/llvm/lib/IR/Core.cpp +++ b/llvm/lib/IR/Core.cpp @@ -1630,7 +1630,7 @@ LLVMValueRef LLVMAddAlias(LLVMModuleRef M, LLVMTypeRef Ty, LLVMValueRef Aliasee, auto *PTy = cast<PointerType>(unwrap(Ty)); return wrap(GlobalAlias::create(PTy->getElementType(), PTy->getAddressSpace(), GlobalValue::ExternalLinkage, Name, - unwrap<GlobalObject>(Aliasee), unwrap(M))); + unwrap<Constant>(Aliasee), unwrap(M))); } /*--.. Operations on functions .............................................--*/ |

