diff options
Diffstat (limited to 'clang/lib/Interpreter/Interpreter.cpp')
-rw-r--r-- | clang/lib/Interpreter/Interpreter.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/lib/Interpreter/Interpreter.cpp b/clang/lib/Interpreter/Interpreter.cpp index 0191ad7..bdba4ae 100644 --- a/clang/lib/Interpreter/Interpreter.cpp +++ b/clang/lib/Interpreter/Interpreter.cpp @@ -183,7 +183,14 @@ Interpreter::Interpreter(std::unique_ptr<CompilerInstance> CI, *TSCtx->getContext(), Err); } -Interpreter::~Interpreter() {} +Interpreter::~Interpreter() { + if (IncrExecutor) { + if (llvm::Error Err = IncrExecutor->cleanUp()) + llvm::report_fatal_error( + llvm::Twine("Failed to clean up IncrementalExecutor: ") + + toString(std::move(Err))); + } +} llvm::Expected<std::unique_ptr<Interpreter>> Interpreter::create(std::unique_ptr<CompilerInstance> CI) { |