diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-05-27 22:47:09 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-05-27 22:47:09 +0000 |
commit | af10fe63c6b0246635e50f480abbf3d679f69246 (patch) | |
tree | 966ae8a23466d987e436a64d9dced99e5f97c8fc /lib/IR/Verifier.cpp | |
parent | 078bdc6cbb572fffc9e39fbaa8052794b93ecf48 (diff) | |
download | external_llvm-af10fe63c6b0246635e50f480abbf3d679f69246.zip external_llvm-af10fe63c6b0246635e50f480abbf3d679f69246.tar.gz external_llvm-af10fe63c6b0246635e50f480abbf3d679f69246.tar.bz2 |
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
Diffstat (limited to 'lib/IR/Verifier.cpp')
-rw-r--r-- | lib/IR/Verifier.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp index a94c156..41364b2 100644 --- a/lib/IR/Verifier.cpp +++ b/lib/IR/Verifier.cpp @@ -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); } } } |