From 0838ba10ee53066435e63c83889d1d640412f315 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 27 May 2013 22:47:09 +0000 Subject: [PATCH] Make it explicit that GlobalAlias are ok in llvm.used. No functionality change. llvm-svn: 182747 --- lib/IR/Verifier.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp index a94c1566a20..41364b2e6a4 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(V) || isa(V), - "invalid llvm.used member", V); + Value *V = Init->getOperand(i)->stripPointerCastsNoFollowAliases(); + Assert1( + isa(V) || isa(V) || isa(V), + "invalid llvm.used member", V); } } }