forked from OSchip/llvm-project
Delete copy-ctor of MachineFrameInfo.
I just hit a nasty bug when writing a unit test after calling MF->getFrameInfo() without declaring the variable as a reference. Deleting the copy-constructor also showed a place in the ARM backend which was doing the same thing, albeit it didn't impact correctness there from the looks of it.
This commit is contained in:
parent
666ee849f0
commit
4fee756c75
|
@ -342,6 +342,8 @@ public:
|
|||
: StackAlignment(assumeAligned(StackAlignment)),
|
||||
StackRealignable(StackRealignable), ForcedRealign(ForcedRealign) {}
|
||||
|
||||
MachineFrameInfo(const MachineFrameInfo &) = delete;
|
||||
|
||||
/// Return true if there are any stack objects in this function.
|
||||
bool hasStackObjects() const { return !Objects.empty(); }
|
||||
|
||||
|
|
|
@ -1121,7 +1121,7 @@ static bool ValidateMVEStore(MachineInstr *MI, MachineLoop *ML) {
|
|||
return false;
|
||||
int FI = GetFrameIndex(MI->memoperands().front());
|
||||
|
||||
MachineFrameInfo FrameInfo = MI->getParent()->getParent()->getFrameInfo();
|
||||
auto &FrameInfo = MI->getParent()->getParent()->getFrameInfo();
|
||||
if (FI == -1 || !FrameInfo.isSpillSlotObjectIndex(FI))
|
||||
return false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue