diff options
| author | Matthias Braun <matze@braunis.de> | 2016-07-28 18:40:00 +0000 |
|---|---|---|
| committer | Matthias Braun <matze@braunis.de> | 2016-07-28 18:40:00 +0000 |
| commit | 941a705b7bf155fc581632ec7d80f22a139bdac0 (patch) | |
| tree | cd87202aa17c3e46adca731ccbf7b73ec1b92d81 /llvm/lib/CodeGen/GCRootLowering.cpp | |
| parent | 51524b755616c9562a00371b1539784320c0b504 (diff) | |
| download | bcm5719-llvm-941a705b7bf155fc581632ec7d80f22a139bdac0.tar.gz bcm5719-llvm-941a705b7bf155fc581632ec7d80f22a139bdac0.zip | |
MachineFunction: Return reference for getFrameInfo(); NFC
getFrameInfo() never returns nullptr so we should use a reference
instead of a pointer.
llvm-svn: 277017
Diffstat (limited to 'llvm/lib/CodeGen/GCRootLowering.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/GCRootLowering.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/GCRootLowering.cpp b/llvm/lib/CodeGen/GCRootLowering.cpp index 326adab2ba6..5d4d0a1bb15 100644 --- a/llvm/lib/CodeGen/GCRootLowering.cpp +++ b/llvm/lib/CodeGen/GCRootLowering.cpp @@ -316,7 +316,7 @@ void GCMachineCodeAnalysis::FindStackOffsets(MachineFunction &MF) { for (GCFunctionInfo::roots_iterator RI = FI->roots_begin(); RI != FI->roots_end();) { // If the root references a dead object, no need to keep it. - if (MF.getFrameInfo()->isDeadObjectIndex(RI->Num)) { + if (MF.getFrameInfo().isDeadObjectIndex(RI->Num)) { RI = FI->removeStackRoot(RI); } else { unsigned FrameReg; // FIXME: surely GCRoot ought to store the @@ -338,11 +338,11 @@ bool GCMachineCodeAnalysis::runOnMachineFunction(MachineFunction &MF) { // Find the size of the stack frame. There may be no correct static frame // size, we use UINT64_MAX to represent this. - const MachineFrameInfo *MFI = MF.getFrameInfo(); + const MachineFrameInfo &MFI = MF.getFrameInfo(); const TargetRegisterInfo *RegInfo = MF.getSubtarget().getRegisterInfo(); - const bool DynamicFrameSize = MFI->hasVarSizedObjects() || + const bool DynamicFrameSize = MFI.hasVarSizedObjects() || RegInfo->needsStackRealignment(MF); - FI->setFrameSize(DynamicFrameSize ? UINT64_MAX : MFI->getStackSize()); + FI->setFrameSize(DynamicFrameSize ? UINT64_MAX : MFI.getStackSize()); // Find all safe points. if (FI->getStrategy().needsSafePoints()) |

