mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
eliminate use of Instruction::getPrev(). Patch by Gabor Greif in 2005.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36198 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4d8c16f15a
commit
b8e237bb86
@ -866,16 +866,19 @@ void Interpreter::visitCallSite(CallSite CS) {
|
||||
// If it is an unknown intrinsic function, use the intrinsic lowering
|
||||
// class to transform it into hopefully tasty LLVM code.
|
||||
//
|
||||
Instruction *Prev = CS.getInstruction()->getPrev();
|
||||
BasicBlock::iterator me(CS.getInstruction());
|
||||
BasicBlock *Parent = CS.getInstruction()->getParent();
|
||||
bool atBegin(Parent->begin() == me);
|
||||
if (!atBegin)
|
||||
--me;
|
||||
IL->LowerIntrinsicCall(cast<CallInst>(CS.getInstruction()));
|
||||
|
||||
// Restore the CurInst pointer to the first instruction newly inserted, if
|
||||
// any.
|
||||
if (!Prev) {
|
||||
if (atBegin) {
|
||||
SF.CurInst = Parent->begin();
|
||||
} else {
|
||||
SF.CurInst = Prev;
|
||||
SF.CurInst = me;
|
||||
++SF.CurInst;
|
||||
}
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user