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/Analysis/TestParallelismDetection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mlir/lib/Analysis/TestParallelismDetection.cpp') diff --git a/mlir/lib/Analysis/TestParallelismDetection.cpp b/mlir/lib/Analysis/TestParallelismDetection.cpp index af112e5b02c..701ef6ab348 100644 --- a/mlir/lib/Analysis/TestParallelismDetection.cpp +++ b/mlir/lib/Analysis/TestParallelismDetection.cpp @@ -43,9 +43,9 @@ FunctionPassBase *mlir::createParallelismDetectionTestPass() { // Walks the function and emits a note for all 'affine.for' ops detected as // parallel. void TestParallelismDetection::runOnFunction() { - Function *f = getFunction(); + Function &f = getFunction(); FuncBuilder b(f); - f->walk([&](AffineForOp forOp) { + f.walk([&](AffineForOp forOp) { if (isLoopParallel(forOp)) forOp.emitNote("parallel loop"); }); -- cgit v1.2.3