llvm.org GIT mirror llvm / 0f53f7f
Let Verifier check aliasees git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36540 91177308-0d34-0410-b5e6-96231b3b80d8 Anton Korobeynikov 13 years ago
1 changed file(s) with 7 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
317317 "Alias should have external or external weak linkage!", &GA);
318318 Assert1(GA.getType() == GA.getAliasee()->getType(),
319319 "Alias and aliasee types should match!", &GA);
320
321 if (!isa(GA.getAliasee())) {
322 const ConstantExpr *CE = dyn_cast(GA.getAliasee());
323 Assert1(CE && CE->getOpcode() == Instruction::BitCast,
324 "Aliasee should be either GlobalValue or bitcast of GlobalValue",
325 &GA);
326 }
320327
321328 visitGlobalValue(GA);
322329 }