MachineFunction: Return reference from getFunction(); NFC
The Function can never be nullptr so we can return a reference.
llvm-svn: 320884
diff --git a/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp b/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp
index 01b3db4..f1885aa 100644
--- a/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp
+++ b/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp
@@ -51,7 +51,7 @@
++NumFunctionsReset;
MF.reset();
if (EmitFallbackDiag) {
- const Function &F = *MF.getFunction();
+ const Function &F = MF.getFunction();
DiagnosticInfoISelFallback DiagFallback(F);
F.getContext().diagnose(DiagFallback);
}