blob: 1feb4381e96bf51e3e2f0722e2f8f35dbd13e286 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
//===-- 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
|