summaryrefslogtreecommitdiff
path: root/src/passes/ConstHoisting.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/ConstHoisting.cpp')
-rw-r--r--src/passes/ConstHoisting.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/passes/ConstHoisting.cpp b/src/passes/ConstHoisting.cpp
index 3d9ac5e90..6463221f4 100644
--- a/src/passes/ConstHoisting.cpp
+++ b/src/passes/ConstHoisting.cpp
@@ -44,7 +44,9 @@ static const Index MIN_USES = 2;
struct ConstHoisting : public WalkerPass<PostWalker<ConstHoisting>> {
bool isFunctionParallel() override { return true; }
- Pass* create() override { return new ConstHoisting; }
+ std::unique_ptr<Pass> create() override {
+ return std::make_unique<ConstHoisting>();
+ }
InsertOrderedMap<Literal, std::vector<Expression**>> uses;