From 941a705b7bf155fc581632ec7d80f22a139bdac0 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Thu, 28 Jul 2016 18:40:00 +0000 Subject: MachineFunction: Return reference for getFrameInfo(); NFC getFrameInfo() never returns nullptr so we should use a reference instead of a pointer. llvm-svn: 277017 --- llvm/lib/CodeGen/AsmPrinter/WinException.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/CodeGen/AsmPrinter/WinException.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/WinException.cpp b/llvm/lib/CodeGen/AsmPrinter/WinException.cpp index e5933d8d416..2dd95a73efb 100644 --- a/llvm/lib/CodeGen/AsmPrinter/WinException.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/WinException.cpp @@ -966,11 +966,11 @@ void WinException::emitExceptHandlerTable(const MachineFunction *MF) { // Retrieve the Guard Stack slot. int GSCookieOffset = -2; - const MachineFrameInfo *MFI = MF->getFrameInfo(); - if (MFI->hasStackProtectorIndex()) { + const MachineFrameInfo &MFI = MF->getFrameInfo(); + if (MFI.hasStackProtectorIndex()) { unsigned UnusedReg; const TargetFrameLowering *TFI = MF->getSubtarget().getFrameLowering(); - int SSPIdx = MFI->getStackProtectorIndex(); + int SSPIdx = MFI.getStackProtectorIndex(); GSCookieOffset = TFI->getFrameIndexReference(*MF, SSPIdx, UnusedReg); } -- cgit v1.2.3