diff options
author | Lang Hames <lhames@gmail.com> | 2018-06-26 22:43:01 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2018-06-26 22:43:01 +0000 |
commit | 2f17824463f407a515ddb9307273a2c34a783851 (patch) | |
tree | e701fddd2feb075f81aad10ad6954d16725a98a8 /llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp | |
parent | 8f9dbb1d645dec5273b9d1fe3887843d76994d6b (diff) | |
download | bcm5719-llvm-2f17824463f407a515ddb9307273a2c34a783851.tar.gz bcm5719-llvm-2f17824463f407a515ddb9307273a2c34a783851.zip |
[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
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp b/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp index 95f039a9762..6157677ce35 100644 --- a/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp +++ b/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp @@ -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); } |