projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73d4bb6
)
Don't crash on bogus llvm.noinline. This is first part of PR1817 (preventing reduction)
author
Anton Korobeynikov
<asl@math.spbu.ru>
Thu, 22 Nov 2007 22:30:10 +0000
(22:30 +0000)
committer
Anton Korobeynikov
<asl@math.spbu.ru>
Thu, 22 Nov 2007 22:30:10 +0000
(22:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44281
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/IPO/InlineSimple.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/IPO/InlineSimple.cpp
b/lib/Transforms/IPO/InlineSimple.cpp
index 38bf0610b3872e84c2b5792cef96db1b77facc24..ebd8a595f21eb924fcb6b4163ca95c19bd5034be 100644
(file)
--- a/
lib/Transforms/IPO/InlineSimple.cpp
+++ b/
lib/Transforms/IPO/InlineSimple.cpp
@@
-59,6
+59,10
@@
bool SimpleInliner::doInitialization(CallGraph &CG) {
if (GV == 0)
return false;
+ // Don't crash on invalid code
+ if (!GV->hasInitializer())
+ return false;
+
const ConstantArray *InitList = dyn_cast<ConstantArray>(GV->getInitializer());
if (InitList == 0)