2001-06-30 04:34:07 +00:00
|
|
|
//===-- 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
|
|
|
|
|
2001-10-18 20:19:09 +00:00
|
|
|
#include "llvm/Pass.h"
|
2001-06-30 04:34:07 +00:00
|
|
|
|
2002-01-21 07:31:50 +00:00
|
|
|
struct SymbolStripping : public MethodPass {
|
2001-10-18 01:31:58 +00:00
|
|
|
// doSymbolStripping - Remove all symbolic information from a method
|
|
|
|
//
|
|
|
|
static bool doSymbolStripping(Method *M);
|
2001-06-30 04:34:07 +00:00
|
|
|
|
2002-01-21 07:31:50 +00:00
|
|
|
virtual bool runOnMethod(Method *M) {
|
2001-10-18 01:31:58 +00:00
|
|
|
return doSymbolStripping(M);
|
|
|
|
}
|
|
|
|
};
|
2001-06-30 04:34:07 +00:00
|
|
|
|
2002-01-21 07:31:50 +00:00
|
|
|
struct FullSymbolStripping : public MethodPass {
|
2001-10-18 01:31:58 +00:00
|
|
|
|
|
|
|
// doStripGlobalSymbols - Remove all symbolic information from all methods
|
|
|
|
// in a module, and all module level symbols. (method names, etc...)
|
|
|
|
//
|
|
|
|
static bool doStripGlobalSymbols(Module *M);
|
|
|
|
|
2002-01-21 07:31:50 +00:00
|
|
|
virtual bool doInitialization(Module *M) {
|
2001-10-18 01:31:58 +00:00
|
|
|
return doStripGlobalSymbols(M);
|
|
|
|
}
|
|
|
|
|
2002-01-21 07:31:50 +00:00
|
|
|
virtual bool runOnMethod(Method *M) {
|
2001-10-18 01:31:58 +00:00
|
|
|
return SymbolStripping::doSymbolStripping(M);
|
|
|
|
}
|
|
|
|
};
|
2001-06-30 04:34:07 +00:00
|
|
|
|
|
|
|
#endif
|