mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-04 17:56:53 +00:00
[ORC] Don't call isa<> on a null value.
This should fix the recent builder failures in the test-global-ctors.ll testcase. llvm-svn: 335680
This commit is contained in:
parent
db185d0f92
commit
f82a6ed2d5
@ -109,7 +109,7 @@ CtorDtorIterator::Element CtorDtorIterator::operator*() const {
|
||||
|
||||
ConstantInt *Priority = dyn_cast<ConstantInt>(CS->getOperand(0));
|
||||
Value *Data = CS->getNumOperands() == 3 ? CS->getOperand(2) : nullptr;
|
||||
if (!isa<GlobalValue>(Data))
|
||||
if (Data && !isa<GlobalValue>(Data))
|
||||
Data = nullptr;
|
||||
return Element(Priority->getZExtValue(), Func, Data);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user