mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 21:34:23 +00:00
Just use a SmallVector.
I was confused whether new uint8_t[] would zero-initialize the returned array, and it seems that so is gcc-4.0. This should fix the test failures on darwin 9. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132500 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
effc34ec59
commit
6edf90b8a7
@ -39,7 +39,8 @@ void RegisterClassInfo::runOnMachineFunction(const MachineFunction &mf) {
|
||||
if (Update || CSR != CalleeSaved) {
|
||||
// Build a CSRNum map. Every CSR alias gets an entry pointing to the last
|
||||
// overlapping CSR.
|
||||
CSRNum.reset(new uint8_t[TRI->getNumRegs()]());
|
||||
CSRNum.clear();
|
||||
CSRNum.resize(TRI->getNumRegs(), 0);
|
||||
for (unsigned N = 0; unsigned Reg = CSR[N]; ++N)
|
||||
for (const unsigned *AS = TRI->getOverlaps(Reg);
|
||||
unsigned Alias = *AS; ++AS)
|
||||
|
@ -51,7 +51,7 @@ class RegisterClassInfo {
|
||||
const unsigned *CalleeSaved;
|
||||
|
||||
// Map register number to CalleeSaved index + 1;
|
||||
OwningArrayPtr<uint8_t> CSRNum;
|
||||
SmallVector<uint8_t, 4> CSRNum;
|
||||
|
||||
// Reserved registers in the current MF.
|
||||
BitVector Reserved;
|
||||
|
Loading…
x
Reference in New Issue
Block a user