Move stuff out of the Optimizations directories into the appropriate Transforms
[oota-llvm.git] / include / llvm / Transforms / Scalar / SymbolStripping.h
1 //===-- SymbolStripping.h - Functions that Strip Symbol Tables ---*- C++ -*--=//
2 //
3 // This family of functions removes symbols from the symbol tables of methods
4 // and classes.
5 //
6 //===----------------------------------------------------------------------===//
7
8 #ifndef LLVM_OPT_SYMBOL_STRIPPING_H
9 #define LLVM_OPT_SYMBOL_STRIPPING_H
10
11 #include "llvm/Pass.h"
12
13 struct SymbolStripping : public MethodPass {
14   // doSymbolStripping - Remove all symbolic information from a method
15   //
16   static bool doSymbolStripping(Method *M);
17
18   virtual bool runOnMethod(Method *M) {
19     return doSymbolStripping(M);
20   }
21 };
22
23 struct FullSymbolStripping : public MethodPass {
24   
25   // doStripGlobalSymbols - Remove all symbolic information from all methods 
26   // in a module, and all module level symbols. (method names, etc...)
27   //
28   static bool doStripGlobalSymbols(Module *M);
29
30   virtual bool doInitialization(Module *M) {
31     return doStripGlobalSymbols(M);
32   }
33
34   virtual bool runOnMethod(Method *M) {
35     return SymbolStripping::doSymbolStripping(M);
36   }
37 };
38
39 #endif