mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-11 10:31:40 +00:00
Add an assertion to the ScheduleDAGInstrs class to catch SUnits
reallocations. We don't do cloning on MachineInstr schedule DAGs, but this is a worthwhile sanity check regardless. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61343 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fb8a1356b2
commit
361c31da5e
@ -36,7 +36,11 @@ namespace llvm {
|
|||||||
/// NewSUnit - Creates a new SUnit and return a ptr to it.
|
/// NewSUnit - Creates a new SUnit and return a ptr to it.
|
||||||
///
|
///
|
||||||
SUnit *NewSUnit(MachineInstr *MI) {
|
SUnit *NewSUnit(MachineInstr *MI) {
|
||||||
|
#ifndef NDEBUG
|
||||||
|
const SUnit *Addr = &SUnits[0];
|
||||||
|
#endif
|
||||||
SUnits.push_back(SUnit(MI, (unsigned)SUnits.size()));
|
SUnits.push_back(SUnit(MI, (unsigned)SUnits.size()));
|
||||||
|
assert(Addr == &SUnits[0] && "SUnits std::vector reallocated on the fly!");
|
||||||
SUnits.back().OrigNode = &SUnits.back();
|
SUnits.back().OrigNode = &SUnits.back();
|
||||||
return &SUnits.back();
|
return &SUnits.back();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user