From 46ade282c8d98558d0d1b8e79d2eee3ae00086f1 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 25 Mar 2019 18:02:49 -0700 Subject: Make FunctionPass::getFunction() return a reference to the function, instead of a pointer. This makes it consistent with all the other methods in FunctionPass, as well as with ModulePass::getModule(). NFC. PiperOrigin-RevId: 240257910 --- mlir/lib/Transforms/SimplifyAffineStructures.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mlir/lib/Transforms/SimplifyAffineStructures.cpp') diff --git a/mlir/lib/Transforms/SimplifyAffineStructures.cpp b/mlir/lib/Transforms/SimplifyAffineStructures.cpp index 47d68461fa5..ab83ede303c 100644 --- a/mlir/lib/Transforms/SimplifyAffineStructures.cpp +++ b/mlir/lib/Transforms/SimplifyAffineStructures.cpp @@ -93,7 +93,7 @@ FunctionPassBase *mlir::createSimplifyAffineStructuresPass() { void SimplifyAffineStructures::runOnFunction() { simplifiedAttributes.clear(); - getFunction()->walk([&](Instruction *opInst) { + getFunction().walk([&](Instruction *opInst) { for (auto attr : opInst->getAttrs()) { if (auto mapAttr = attr.second.dyn_cast()) simplifyAndUpdateAttribute(opInst, attr.first, mapAttr); -- cgit v1.2.3