1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Make it explicit that GlobalAlias are ok in llvm.used.

No functionality change.

llvm-svn: 182747
This commit is contained in:
Rafael Espindola 2013-05-27 22:47:09 +00:00
parent 18790cef3b
commit 0838ba10ee

View File

@ -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);
}
}
}