From f1caa2833f5052c419faa0007a38e0b242d5b034 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Fri, 15 Dec 2017 22:22:58 +0000 Subject: MachineFunction: Return reference from getFunction(); NFC The Function can never be nullptr so we can return a reference. llvm-svn: 320884 --- llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/TwoAddressInstructionPass.cpp') diff --git a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp index f48db12b975..774b76f84b7 100644 --- a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -1663,7 +1663,7 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &Func) { OptLevel = TM.getOptLevel(); // Disable optimizations if requested. We cannot skip the whole pass as some // fixups are necessary for correctness. - if (skipFunction(*Func.getFunction())) + if (skipFunction(Func.getFunction())) OptLevel = CodeGenOpt::None; bool MadeChange = false; -- cgit v1.2.3