Avoid deleting individual instructions until AFTER dead blocks have dropped
[oota-llvm.git] / lib / Transforms / Scalar / SymbolStripping.cpp
index 36b465ebb658dd8bd1218674105b35354322aebe..cc0852e7d166a2101da0e48b9e79fb6d0afec88b 100644 (file)
@@ -14,7 +14,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/Transforms/SymbolStripping.h"
+#include "llvm/Transforms/Scalar.h"
 #include "llvm/Module.h"
 #include "llvm/Function.h"
 #include "llvm/SymbolTable.h"
@@ -61,12 +61,18 @@ static bool doStripGlobalSymbols(Module *M) {
 
 namespace {
   struct SymbolStripping : public FunctionPass {
+    const char *getPassName() const { return "Strip Symbols from Functions"; }
+
     virtual bool runOnFunction(Function *F) {
       return doSymbolStripping(F);
     }
+    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+      AU.setPreservesAll();
+    }
   };
 
   struct FullSymbolStripping : public SymbolStripping {
+    const char *getPassName() const { return "Strip Symbols from Module"; }
     virtual bool doInitialization(Module *M) {
       return doStripGlobalSymbols(M);
     }