diff options
Diffstat (limited to 'mlir/lib/Transforms/StripDebugInfo.cpp')
| -rw-r--r-- | mlir/lib/Transforms/StripDebugInfo.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mlir/lib/Transforms/StripDebugInfo.cpp b/mlir/lib/Transforms/StripDebugInfo.cpp index f8f90c0cdb1..47244f94ac9 100644 --- a/mlir/lib/Transforms/StripDebugInfo.cpp +++ b/mlir/lib/Transforms/StripDebugInfo.cpp @@ -29,12 +29,12 @@ struct StripDebugInfo : public FunctionPass<StripDebugInfo> { } // 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. |

