llvm-6502/include/llvm/Transforms/Scalar/SymbolStripping.h
2001-10-18 20:19:09 +00:00

43 lines
1.1 KiB
C++

//===-- SymbolStripping.h - Functions that Strip Symbol Tables ---*- C++ -*--=//
//
// This family of functions removes symbols from the symbol tables of methods
// and classes.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_OPT_SYMBOL_STRIPPING_H
#define LLVM_OPT_SYMBOL_STRIPPING_H
#include "llvm/Pass.h"
namespace opt {
struct SymbolStripping : public Pass {
// doSymbolStripping - Remove all symbolic information from a method
//
static bool doSymbolStripping(Method *M);
virtual bool doPerMethodWork(Method *M) {
return doSymbolStripping(M);
}
};
struct FullSymbolStripping : public Pass {
// doStripGlobalSymbols - Remove all symbolic information from all methods
// in a module, and all module level symbols. (method names, etc...)
//
static bool doStripGlobalSymbols(Module *M);
virtual bool doPassInitialization(Module *M) {
return doStripGlobalSymbols(M);
}
virtual bool doPerMethodWork(Method *M) {
return SymbolStripping::doSymbolStripping(M);
}
};
} // End namespace opt
#endif