diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-05-26 19:57:55 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-05-26 19:57:55 +0000 |
commit | 19913ee1606635068e87b9918a9ebc381420f320 (patch) | |
tree | 88da1c3f54f7425a8c56ef97a1a55b59fdb8623a /llvm/lib/IR/Verifier.cpp | |
parent | ac69cee6a2ea991419c8c851d0c4460fbf224c50 (diff) | |
download | bcm5719-llvm-19913ee1606635068e87b9918a9ebc381420f320.tar.gz bcm5719-llvm-19913ee1606635068e87b9918a9ebc381420f320.zip |
Use existing helper function.
No functionality change.
llvm-svn: 209639
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r-- | llvm/lib/IR/Verifier.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index 80e731ab152..bcc38c1ad51 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -497,14 +497,7 @@ void Verifier::visitGlobalAlias(const GlobalAlias &GA) { "addrspacecast of GlobalValue", &GA); - if (CE->getOpcode() == Instruction::BitCast) { - unsigned SrcAS = GV->getType()->getPointerAddressSpace(); - unsigned DstAS = CE->getType()->getPointerAddressSpace(); - - Assert1(SrcAS == DstAS, - "Alias bitcasts cannot be between different address spaces", - &GA); - } + VerifyConstantExprBitcastType(CE); } Assert1(!GV->isDeclaration(), "Alias must point to a definition", &GA); if (const GlobalAlias *GAAliasee = dyn_cast<GlobalAlias>(GV)) { |