aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen/DAGISelEmitter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/TableGen/DAGISelEmitter.cpp')
-rw-r--r--utils/TableGen/DAGISelEmitter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp
index e2e6ab1..0fe3bbd 100644
--- a/utils/TableGen/DAGISelEmitter.cpp
+++ b/utils/TableGen/DAGISelEmitter.cpp
@@ -157,12 +157,12 @@ void DAGISelEmitter::run(raw_ostream &OS) {
}
}
- Matcher *TheMatcher = new ScopeMatcher(PatternMatchers);
+ std::unique_ptr<Matcher> TheMatcher =
+ llvm::make_unique<ScopeMatcher>(PatternMatchers);
- TheMatcher = OptimizeMatcher(TheMatcher, CGP);
+ OptimizeMatcher(TheMatcher, CGP);
//Matcher->dump();
- EmitMatcherTable(TheMatcher, CGP, OS);
- delete TheMatcher;
+ EmitMatcherTable(TheMatcher.get(), CGP, OS);
}
namespace llvm {