OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d0cbe2
)
[ORC] Don't call isa<> on a null value.
author
Lang Hames
<lhames@gmail.com>
Tue, 26 Jun 2018 22:43:01 +0000
(22:43 +0000)
committer
Lang Hames
<lhames@gmail.com>
Tue, 26 Jun 2018 22:43:01 +0000
(22:43 +0000)
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
lib/ExecutionEngine/Orc/ExecutionUtils.cpp
patch
|
blob
|
history
diff --git
a/lib/ExecutionEngine/Orc/ExecutionUtils.cpp
b/lib/ExecutionEngine/Orc/ExecutionUtils.cpp
index
95f039a
..
6157677
100644
(file)
--- a/
lib/ExecutionEngine/Orc/ExecutionUtils.cpp
+++ b/
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);
}