diff options
Diffstat (limited to 'tools/llvm-dis/llvm-dis.cpp')
-rw-r--r-- | tools/llvm-dis/llvm-dis.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/llvm-dis/llvm-dis.cpp b/tools/llvm-dis/llvm-dis.cpp index 89073c0..43bde53 100644 --- a/tools/llvm-dis/llvm-dis.cpp +++ b/tools/llvm-dis/llvm-dis.cpp @@ -89,7 +89,12 @@ int main(int argc, char **argv) { OutputFilename = IFN+".ll"; } } - + + // Make sure that the Out file gets unlinked from the disk if we get a + // SIGINT. + if (OutputFilename != "-") + sys::RemoveFileOnSignal(sys::Path(OutputFilename)); + std::string ErrorInfo; std::auto_ptr<raw_fd_ostream> Out(new raw_fd_ostream(OutputFilename.c_str(), ErrorInfo, @@ -99,11 +104,6 @@ int main(int argc, char **argv) { return 1; } - // Make sure that the Out file gets unlinked from the disk if we get a - // SIGINT. - if (OutputFilename != "-") - sys::RemoveFileOnSignal(sys::Path(OutputFilename)); - // All that llvm-dis does is write the assembly to a file. if (!DontPrint) { PassManager Passes; |