summaryrefslogtreecommitdiffstats
path: root/mlir/test/lib/Transforms/TestLoopMapping.cpp
diff options
context:
space:
mode:
authorMehdi Amini <aminim@google.com>2019-08-12 19:12:42 -0700
committerA. Unique TensorFlower <gardener@tensorflow.org>2019-08-12 19:13:12 -0700
commit926fb685deadfed2042163145ac52311914bf5c2 (patch)
tree6af2d1fc60691dbd3e216fd38180795470c07654 /mlir/test/lib/Transforms/TestLoopMapping.cpp
parent532c652d6c5490f9d5380fc7d40837e6414c2ef8 (diff)
downloadbcm5719-llvm-926fb685deadfed2042163145ac52311914bf5c2.tar.gz
bcm5719-llvm-926fb685deadfed2042163145ac52311914bf5c2.zip
Express ownership transfer in PassManager API through std::unique_ptr (NFC)
Since raw pointers are always passed around for IR construct without implying any ownership transfer, it can be error prone to have implicit ownership transferred the same way. For example this code can seem harmless: Pass *pass = .... pm.addPass(pass); pm.addPass(pass); pm.run(module); PiperOrigin-RevId: 263053082
Diffstat (limited to 'mlir/test/lib/Transforms/TestLoopMapping.cpp')
-rw-r--r--mlir/test/lib/Transforms/TestLoopMapping.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/test/lib/Transforms/TestLoopMapping.cpp b/mlir/test/lib/Transforms/TestLoopMapping.cpp
index bf354670f92..a9da70a6d5e 100644
--- a/mlir/test/lib/Transforms/TestLoopMapping.cpp
+++ b/mlir/test/lib/Transforms/TestLoopMapping.cpp
@@ -62,4 +62,4 @@ public:
static PassRegistration<TestLoopMappingPass>
reg("test-mapping-to-processing-elements",
"test mapping a single loop on a virtual processor grid",
- [] { return new TestLoopMappingPass(); });
+ [] { return llvm::make_unique<TestLoopMappingPass>(); });
OpenPOWER on IntegriCloud