mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-16 00:33:10 +00:00
Make it explicit that GlobalAlias are ok in llvm.used.
No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182747 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
078bdc6cbb
commit
af10fe63c6
@ -463,11 +463,10 @@ void Verifier::visitGlobalVariable(GlobalVariable &GV) {
|
||||
Assert1(InitArray, "wrong initalizer for intrinsic global variable",
|
||||
Init);
|
||||
for (unsigned i = 0, e = InitArray->getNumOperands(); i != e; ++i) {
|
||||
Value *V = Init->getOperand(i)->stripPointerCasts();
|
||||
// stripPointerCasts strips aliases, so we only need to check for
|
||||
// variables and functions.
|
||||
Assert1(isa<GlobalVariable>(V) || isa<Function>(V),
|
||||
"invalid llvm.used member", V);
|
||||
Value *V = Init->getOperand(i)->stripPointerCastsNoFollowAliases();
|
||||
Assert1(
|
||||
isa<GlobalVariable>(V) || isa<Function>(V) || isa<GlobalAlias>(V),
|
||||
"invalid llvm.used member", V);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user