1 //===-- SymbolStripping.h - Functions that Strip Symbol Tables ---*- C++ -*--=//
3 // This family of functions removes symbols from the symbol tables of methods
6 //===----------------------------------------------------------------------===//
8 #ifndef LLVM_OPT_SYMBOL_STRIPPING_H
9 #define LLVM_OPT_SYMBOL_STRIPPING_H
11 #include "llvm/Pass.h"
15 struct SymbolStripping : public MethodPass {
16 // doSymbolStripping - Remove all symbolic information from a method
18 static bool doSymbolStripping(Method *M);
20 virtual bool runOnMethod(Method *M) {
21 return doSymbolStripping(M);
25 struct FullSymbolStripping : public MethodPass {
27 // doStripGlobalSymbols - Remove all symbolic information from all methods
28 // in a module, and all module level symbols. (method names, etc...)
30 static bool doStripGlobalSymbols(Module *M);
32 virtual bool doInitialization(Module *M) {
33 return doStripGlobalSymbols(M);
36 virtual bool runOnMethod(Method *M) {
37 return SymbolStripping::doSymbolStripping(M);
41 } // End namespace opt