summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Transforms/StripDebugInfo.cpp
diff options
context:
space:
mode:
authorUday Bondhugula <bondhugula@google.com>2019-03-05 15:05:34 -0800
committerjpienaar <jpienaar@google.com>2019-03-29 16:58:35 -0700
commit02af8c22df523d7cda4399058e0a0945d54f4972 (patch)
treeb49de902095777a37a8f109f3506147190134fc3 /mlir/lib/Transforms/StripDebugInfo.cpp
parent73e0297d36452555cb9552827c498c8bde1a5f74 (diff)
downloadbcm5719-llvm-02af8c22df523d7cda4399058e0a0945d54f4972.tar.gz
bcm5719-llvm-02af8c22df523d7cda4399058e0a0945d54f4972.zip
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
Diffstat (limited to 'mlir/lib/Transforms/StripDebugInfo.cpp')
-rw-r--r--mlir/lib/Transforms/StripDebugInfo.cpp8
1 files changed, 4 insertions, 4 deletions
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<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.
OpenPOWER on IntegriCloud