mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
Fix bogus assert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5949 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -28,8 +28,8 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
/// BMI - A special BuildMI variant that takes an iterator to insert the
|
/// BMI - A special BuildMI variant that takes an iterator to insert the
|
||||||
/// instruction at as well as a basic block.
|
/// instruction at as well as a basic block. This is the version for when you
|
||||||
/// this is the version for when you have a destination register in mind.
|
/// have a destination register in mind.
|
||||||
inline static MachineInstrBuilder BMI(MachineBasicBlock *MBB,
|
inline static MachineInstrBuilder BMI(MachineBasicBlock *MBB,
|
||||||
MachineBasicBlock::iterator &I,
|
MachineBasicBlock::iterator &I,
|
||||||
MachineOpCode Opcode,
|
MachineOpCode Opcode,
|
||||||
@@ -47,7 +47,7 @@ inline static MachineInstrBuilder BMI(MachineBasicBlock *MBB,
|
|||||||
MachineBasicBlock::iterator &I,
|
MachineBasicBlock::iterator &I,
|
||||||
MachineOpCode Opcode,
|
MachineOpCode Opcode,
|
||||||
unsigned NumOperands) {
|
unsigned NumOperands) {
|
||||||
assert(I > MBB->begin() && I <= MBB->end() && "Bad iterator!");
|
assert(I >= MBB->begin() && I <= MBB->end() && "Bad iterator!");
|
||||||
MachineInstr *MI = new MachineInstr(Opcode, NumOperands, true, true);
|
MachineInstr *MI = new MachineInstr(Opcode, NumOperands, true, true);
|
||||||
I = MBB->insert(I, MI)+1;
|
I = MBB->insert(I, MI)+1;
|
||||||
return MachineInstrBuilder(MI);
|
return MachineInstrBuilder(MI);
|
||||||
|
@@ -28,8 +28,8 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
/// BMI - A special BuildMI variant that takes an iterator to insert the
|
/// BMI - A special BuildMI variant that takes an iterator to insert the
|
||||||
/// instruction at as well as a basic block.
|
/// instruction at as well as a basic block. This is the version for when you
|
||||||
/// this is the version for when you have a destination register in mind.
|
/// have a destination register in mind.
|
||||||
inline static MachineInstrBuilder BMI(MachineBasicBlock *MBB,
|
inline static MachineInstrBuilder BMI(MachineBasicBlock *MBB,
|
||||||
MachineBasicBlock::iterator &I,
|
MachineBasicBlock::iterator &I,
|
||||||
MachineOpCode Opcode,
|
MachineOpCode Opcode,
|
||||||
@@ -47,7 +47,7 @@ inline static MachineInstrBuilder BMI(MachineBasicBlock *MBB,
|
|||||||
MachineBasicBlock::iterator &I,
|
MachineBasicBlock::iterator &I,
|
||||||
MachineOpCode Opcode,
|
MachineOpCode Opcode,
|
||||||
unsigned NumOperands) {
|
unsigned NumOperands) {
|
||||||
assert(I > MBB->begin() && I <= MBB->end() && "Bad iterator!");
|
assert(I >= MBB->begin() && I <= MBB->end() && "Bad iterator!");
|
||||||
MachineInstr *MI = new MachineInstr(Opcode, NumOperands, true, true);
|
MachineInstr *MI = new MachineInstr(Opcode, NumOperands, true, true);
|
||||||
I = MBB->insert(I, MI)+1;
|
I = MBB->insert(I, MI)+1;
|
||||||
return MachineInstrBuilder(MI);
|
return MachineInstrBuilder(MI);
|
||||||
|
Reference in New Issue
Block a user