mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +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.
|
||||
///
|
||||
ModulePass *createInternalizePass(bool InternalizeEverything);
|
||||
ModulePass *createInternalizePass(const std::vector<const char *> &exportList);
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
/// createDeadArgEliminationPass - This pass removes arguments from functions
|
||||
|
@ -45,6 +45,7 @@ namespace {
|
||||
bool DontInternalize;
|
||||
public:
|
||||
InternalizePass(bool InternalizeEverything = true);
|
||||
InternalizePass(const std::vector <const char *>& exportList);
|
||||
void LoadFile(const char *Filename);
|
||||
virtual bool runOnModule(Module &M);
|
||||
};
|
||||
@ -62,6 +63,13 @@ InternalizePass::InternalizePass(bool InternalizeEverything)
|
||||
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) {
|
||||
// Load the APIFile...
|
||||
std::ifstream In(Filename);
|
||||
@ -151,3 +159,7 @@ bool InternalizePass::runOnModule(Module &M) {
|
||||
ModulePass *llvm::createInternalizePass(bool InternalizeEverything) {
|
||||
return new InternalizePass(InternalizeEverything);
|
||||
}
|
||||
|
||||
ModulePass *llvm::createInternalizePass(const std::vector <const char *> &exportList) {
|
||||
return new InternalizePass(exportList);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user