summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Verifier.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r--llvm/lib/IR/Verifier.cpp9
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)) {
OpenPOWER on IntegriCloud