Add some basic checks of CallInst's.
[oota-llvm.git] / tools / gccas / gccas.cpp
index 3f52e004f67cdd2ee2af0ac1f95f8833216ddb10..02d7cfe827f8904f8bf3019d186960d1a419f0a3 100644 (file)
@@ -20,6 +20,7 @@
 #include "llvm/Transforms/Scalar/PromoteMemoryToRegister.h"
 #include "llvm/Bytecode/WriteBytecodePass.h"
 #include "Support/CommandLine.h"
+#include "Support/Signals.h"
 #include <memory>
 #include <fstream>
 #include <string>
@@ -64,10 +65,14 @@ int main(int argc, char **argv) {
     return 1;
   }
 
+  // Make sure that the Out file gets unlink'd from the disk if we get a SIGINT
+  RemoveFileOnSignal(OutputFilename);
+
   // In addition to just parsing the input from GCC, we also want to spiff it up
   // a little bit.  Do this now.
   //
   PassManager Passes;
+  Passes.add(createFunctionResolvingPass());      // Resolve (...) functions
   Passes.add(createDeadInstEliminationPass());    // Remove Dead code/vars
   Passes.add(createRaiseAllocationsPass());       // call %malloc -> malloc inst
   Passes.add(createCleanupGCCOutputPass());       // Fix gccisms