From 02af8c22df523d7cda4399058e0a0945d54f4972 Mon Sep 17 00:00:00 2001 From: Uday Bondhugula Date: Tue, 5 Mar 2019 15:05:34 -0800 Subject: Change Pass:getFunction() to return pointer instead of ref - NFC - change this for consistency - everything else similar takes/returns a Function pointer - the FuncBuilder ctor, Block/Value/Instruction::getFunction(), etc. - saves a whole bunch of &s everywhere PiperOrigin-RevId: 236928761 --- mlir/lib/Transforms/StripDebugInfo.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mlir/lib/Transforms/StripDebugInfo.cpp') diff --git a/mlir/lib/Transforms/StripDebugInfo.cpp b/mlir/lib/Transforms/StripDebugInfo.cpp index 47244f94ac9..f8f90c0cdb1 100644 --- a/mlir/lib/Transforms/StripDebugInfo.cpp +++ b/mlir/lib/Transforms/StripDebugInfo.cpp @@ -29,12 +29,12 @@ struct StripDebugInfo : public FunctionPass { } // end anonymous namespace void StripDebugInfo::runOnFunction() { - Function &func = getFunction(); - UnknownLoc unknownLoc = UnknownLoc::get(func.getContext()); + Function *func = getFunction(); + UnknownLoc unknownLoc = UnknownLoc::get(func->getContext()); // Strip the debug info from the function and its instructions. - func.setLoc(unknownLoc); - func.walk([&](Instruction *inst) { inst->setLoc(unknownLoc); }); + func->setLoc(unknownLoc); + func->walk([&](Instruction *inst) { inst->setLoc(unknownLoc); }); } /// Creates a pass to strip debug information from a function. -- cgit v1.2.3