summaryrefslogtreecommitdiff
path: root/tools/llvm-as/llvm-as.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llvm-as/llvm-as.cpp')
-rw-r--r--tools/llvm-as/llvm-as.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/llvm-as/llvm-as.cpp b/tools/llvm-as/llvm-as.cpp
index 7bea711826..3e8a9eaf31 100644
--- a/tools/llvm-as/llvm-as.cpp
+++ b/tools/llvm-as/llvm-as.cpp
@@ -13,6 +13,7 @@
#include "llvm/Assembly/Parser.h"
#include "llvm/Bytecode/Writer.h"
#include "Support/CommandLine.h"
+#include "Support/Signals.h"
#include <fstream>
#include <string>
#include <memory>
@@ -70,6 +71,9 @@ int main(int argc, char **argv) {
}
Out = new std::ofstream(OutputFilename.c_str());
+ // Make sure that the Out file gets unlink'd from the disk if we get a
+ // SIGINT
+ RemoveFileOnSignal(OutputFilename);
}
}