forked from OSchip/llvm-project
Don't crash on bogus llvm.noinline. This is first part of PR1817 (preventing reduction)
llvm-svn: 44281
This commit is contained in:
parent
a915b538d3
commit
59c11686cc
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue