mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-30 17:33:24 +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:
parent
73d4bb6676
commit
311c4b6e98
@ -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
Block a user