mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-21 03:28:31 +00:00
added ability to dynamically change the ExportList of an already
created InternalizePass (useful for pass reuse) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173474 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7e4aeba9f3
commit
3f16858579
@ -50,6 +50,8 @@ namespace {
|
||||
explicit InternalizePass();
|
||||
explicit InternalizePass(ArrayRef<const char *> exportList);
|
||||
void LoadFile(const char *Filename);
|
||||
void ClearExportList();
|
||||
void AddToExportList(const std::string &val);
|
||||
virtual bool runOnModule(Module &M);
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
@ -97,6 +99,14 @@ void InternalizePass::LoadFile(const char *Filename) {
|
||||
}
|
||||
}
|
||||
|
||||
void InternalizePass::ClearExportList() {
|
||||
ExternalNames.clear();
|
||||
}
|
||||
|
||||
void InternalizePass::AddToExportList(const std::string &val) {
|
||||
ExternalNames.insert(val);
|
||||
}
|
||||
|
||||
bool InternalizePass::runOnModule(Module &M) {
|
||||
CallGraph *CG = getAnalysisIfAvailable<CallGraph>();
|
||||
CallGraphNode *ExternalNode = CG ? CG->getExternalCallingNode() : 0;
|
||||
|
Loading…
Reference in New Issue
Block a user