diff options
author | Pedro Artigas <partigas@apple.com> | 2013-01-25 19:41:03 +0000 |
---|---|---|
committer | Pedro Artigas <partigas@apple.com> | 2013-01-25 19:41:03 +0000 |
commit | b95c98faa28c32eb98171fb63bc1450dea05f431 (patch) | |
tree | 1b34e88b3e9b1587ef3ae07c11218c5459d6af48 /llvm/lib/Transforms/IPO/Internalize.cpp | |
parent | e2a2222d53ae03da19e6f7cbcffb2438bfe4b7d2 (diff) | |
download | bcm5719-llvm-b95c98faa28c32eb98171fb63bc1450dea05f431.tar.gz bcm5719-llvm-b95c98faa28c32eb98171fb63bc1450dea05f431.zip |
added ability to dynamically change the ExportList of an already
created InternalizePass (useful for pass reuse)
llvm-svn: 173474
Diffstat (limited to 'llvm/lib/Transforms/IPO/Internalize.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/Internalize.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/Internalize.cpp b/llvm/lib/Transforms/IPO/Internalize.cpp index 70d55b00615..4bfab5b0afb 100644 --- a/llvm/lib/Transforms/IPO/Internalize.cpp +++ b/llvm/lib/Transforms/IPO/Internalize.cpp @@ -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; |