mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-22 10:24:26 +00:00
Do not use typeinfo to identify pass in pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36632 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -46,16 +46,18 @@ namespace {
|
||||
std::set<std::string> ExternalNames;
|
||||
bool DontInternalize;
|
||||
public:
|
||||
static const int ID; // Pass identifcation, replacement for typeid
|
||||
InternalizePass(bool InternalizeEverything = true);
|
||||
InternalizePass(const std::vector <const char *>& exportList);
|
||||
void LoadFile(const char *Filename);
|
||||
virtual bool runOnModule(Module &M);
|
||||
};
|
||||
const int InternalizePass::ID = 0;
|
||||
RegisterPass<InternalizePass> X("internalize", "Internalize Global Symbols");
|
||||
} // end anonymous namespace
|
||||
|
||||
InternalizePass::InternalizePass(bool InternalizeEverything)
|
||||
: DontInternalize(false){
|
||||
: ModulePass((intptr_t)&ID), DontInternalize(false){
|
||||
if (!APIFile.empty()) // If a filename is specified, use it
|
||||
LoadFile(APIFile.c_str());
|
||||
else if (!APIList.empty()) // Else, if a list is specified, use it.
|
||||
@ -66,7 +68,7 @@ InternalizePass::InternalizePass(bool InternalizeEverything)
|
||||
}
|
||||
|
||||
InternalizePass::InternalizePass(const std::vector<const char *>&exportList)
|
||||
: DontInternalize(false){
|
||||
: ModulePass((intptr_t)&ID), DontInternalize(false){
|
||||
for(std::vector<const char *>::const_iterator itr = exportList.begin();
|
||||
itr != exportList.end(); itr++) {
|
||||
ExternalNames.insert(*itr);
|
||||
|
Reference in New Issue
Block a user