mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-20 20:38:48 +00:00
Add new constructor to accept vector of exported names while creating
InternalizePass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29222 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ae6153f943
commit
753d94a1c8
@ -117,6 +117,7 @@ ModulePass *createPruneEHPass();
|
|||||||
/// the main function is found, all other globals are marked as internal.
|
/// the main function is found, all other globals are marked as internal.
|
||||||
///
|
///
|
||||||
ModulePass *createInternalizePass(bool InternalizeEverything);
|
ModulePass *createInternalizePass(bool InternalizeEverything);
|
||||||
|
ModulePass *createInternalizePass(const std::vector<const char *> &exportList);
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
/// createDeadArgEliminationPass - This pass removes arguments from functions
|
/// createDeadArgEliminationPass - This pass removes arguments from functions
|
||||||
|
@ -45,6 +45,7 @@ namespace {
|
|||||||
bool DontInternalize;
|
bool DontInternalize;
|
||||||
public:
|
public:
|
||||||
InternalizePass(bool InternalizeEverything = true);
|
InternalizePass(bool InternalizeEverything = true);
|
||||||
|
InternalizePass(const std::vector <const char *>& exportList);
|
||||||
void LoadFile(const char *Filename);
|
void LoadFile(const char *Filename);
|
||||||
virtual bool runOnModule(Module &M);
|
virtual bool runOnModule(Module &M);
|
||||||
};
|
};
|
||||||
@ -62,6 +63,13 @@ InternalizePass::InternalizePass(bool InternalizeEverything)
|
|||||||
DontInternalize = true;
|
DontInternalize = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
InternalizePass::InternalizePass(const std::vector<const char *>&exportList) {
|
||||||
|
for(std::vector<const char *>::const_iterator itr = exportList.begin();
|
||||||
|
itr != exportList.end(); itr++) {
|
||||||
|
ExternalNames.insert(*itr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void InternalizePass::LoadFile(const char *Filename) {
|
void InternalizePass::LoadFile(const char *Filename) {
|
||||||
// Load the APIFile...
|
// Load the APIFile...
|
||||||
std::ifstream In(Filename);
|
std::ifstream In(Filename);
|
||||||
@ -151,3 +159,7 @@ bool InternalizePass::runOnModule(Module &M) {
|
|||||||
ModulePass *llvm::createInternalizePass(bool InternalizeEverything) {
|
ModulePass *llvm::createInternalizePass(bool InternalizeEverything) {
|
||||||
return new InternalizePass(InternalizeEverything);
|
return new InternalizePass(InternalizeEverything);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ModulePass *llvm::createInternalizePass(const std::vector <const char *> &exportList) {
|
||||||
|
return new InternalizePass(exportList);
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user