mirror of
https://github.com/RPCS3/llvm.git
synced 2025-05-19 11:55:55 +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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335680 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1d0cbe2918
commit
1b30e51a07
@ -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…
x
Reference in New Issue
Block a user