[llvm-remarkutil] bitstream2yaml: Keep output file (#143220)
Keep the output file on successful exit, otherwise `llvm-remarkutil bitstream2yaml -o filename.yaml ...` does not produce any output, because the output file is deleted when the tool exits.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
RUN: llvm-remarkutil bitstream2yaml %p/Inputs/two-remarks.bitstream -o - | FileCheck %s -strict-whitespace
|
||||
RUN: llvm-remarkutil yaml2bitstream %p/Inputs/two-remarks.yaml -o %t
|
||||
RUN: llvm-remarkutil bitstream2yaml %t -o - | FileCheck %s -strict-whitespace
|
||||
RUN: llvm-remarkutil bitstream2yaml %p/Inputs/two-remarks.bitstream -o %t.yaml
|
||||
RUN: FileCheck %s -strict-whitespace < %t.yaml
|
||||
RUN: llvm-remarkutil yaml2bitstream %p/Inputs/two-remarks.yaml -o %t.bitstream
|
||||
RUN: llvm-remarkutil bitstream2yaml %t.bitstream -o - | FileCheck %s -strict-whitespace
|
||||
|
||||
; CHECK: --- !Analysis
|
||||
; CHECK-NEXT: Pass: prologepilog
|
||||
|
||||
@@ -133,6 +133,7 @@ static Error tryBitstream2YAML() {
|
||||
if (!E.isA<EndOfFileError>())
|
||||
return E;
|
||||
consumeError(std::move(E));
|
||||
OF->keep();
|
||||
return Error::success();
|
||||
}
|
||||
} // namespace bitstream2yaml
|
||||
|
||||
Reference in New Issue
Block a user