mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 06:29:05 +00:00
Make sure we don't insert instructions before a landingpad instruction.
<rdar://problem/10405911> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144000 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -97,8 +97,8 @@ AllocaInst* llvm::DemoteRegToStack(Instruction &I, bool VolatileLoads,
|
|||||||
InsertPt = II.getNormalDest()->begin();
|
InsertPt = II.getNormalDest()->begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; isa<PHINode>(InsertPt); ++InsertPt)
|
for (; isa<PHINode>(InsertPt) || isa<LandingPadInst>(InsertPt); ++InsertPt)
|
||||||
/* empty */; // Don't insert before any PHI nodes.
|
/* empty */; // Don't insert before any PHI nodes or landingpad instrs.
|
||||||
new StoreInst(&I, Slot, InsertPt);
|
new StoreInst(&I, Slot, InsertPt);
|
||||||
|
|
||||||
return Slot;
|
return Slot;
|
||||||
|
Reference in New Issue
Block a user