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"
13 struct SymbolStripping : public MethodPass {
14 // doSymbolStripping - Remove all symbolic information from a method
16 static bool doSymbolStripping(Method *M);
18 virtual bool runOnMethod(Method *M) {
19 return doSymbolStripping(M);
23 struct FullSymbolStripping : public MethodPass {
25 // doStripGlobalSymbols - Remove all symbolic information from all methods
26 // in a module, and all module level symbols. (method names, etc...)
28 static bool doStripGlobalSymbols(Module *M);
30 virtual bool doInitialization(Module *M) {
31 return doStripGlobalSymbols(M);
34 virtual bool runOnMethod(Method *M) {
35 return SymbolStripping::doSymbolStripping(M);