mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-20 10:30:17 +00:00
Don't crash on bogus llvm.noinline. This is first part of PR1817 (preventing reduction)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44281 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -59,6 +59,10 @@ bool SimpleInliner::doInitialization(CallGraph &CG) {
|
|||||||
if (GV == 0)
|
if (GV == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// Don't crash on invalid code
|
||||||
|
if (!GV->hasInitializer())
|
||||||
|
return false;
|
||||||
|
|
||||||
const ConstantArray *InitList = dyn_cast<ConstantArray>(GV->getInitializer());
|
const ConstantArray *InitList = dyn_cast<ConstantArray>(GV->getInitializer());
|
||||||
|
|
||||||
if (InitList == 0)
|
if (InitList == 0)
|
||||||
|
Reference in New Issue
Block a user