summaryrefslogtreecommitdiff
path: root/tools/gccld/gccld.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gccld/gccld.cpp')
-rw-r--r--tools/gccld/gccld.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/gccld/gccld.cpp b/tools/gccld/gccld.cpp
index 11595f7d22..1e16aa1006 100644
--- a/tools/gccld/gccld.cpp
+++ b/tools/gccld/gccld.cpp
@@ -24,6 +24,7 @@
#include "llvm/Transforms/ConstantMerge.h"
#include "llvm/Transforms/IPO/GlobalDCE.h"
#include "Support/CommandLine.h"
+#include "Support/Signals.h"
#include <fstream>
#include <memory>
#include <algorithm>
@@ -161,6 +162,9 @@ int main(int argc, char **argv) {
}
Passes.add(new WriteBytecodePass(&Out)); // Write bytecode to file...
+ // Make sure that the Out file gets unlink'd from the disk if we get a SIGINT
+ RemoveFileOnSignal(OutputFilename+".bc");
+
// Run our queue of passes all at once now, efficiently.
Passes.run(Composite.get());
Out.close();