diff options
| author | Reid Spencer <rspencer@reidspencer.com> | 2007-02-04 00:40:42 +0000 |
|---|---|---|
| committer | Reid Spencer <rspencer@reidspencer.com> | 2007-02-04 00:40:42 +0000 |
| commit | 3f4e6e84dc72bdd902497f8fe0ca251bee12bd53 (patch) | |
| tree | 0a9d7a1d25a1d068e2ddf6691e59ede55f3a1d5d /llvm/lib/VMCore | |
| parent | 09ec2c842a021f7b738259be97b664f4ed73d398 (diff) | |
| download | bcm5719-llvm-3f4e6e84dc72bdd902497f8fe0ca251bee12bd53.tar.gz bcm5719-llvm-3f4e6e84dc72bdd902497f8fe0ca251bee12bd53.zip | |
For PR1163:
Make the Module's dependent library use a std::vector instead of SetVector
adjust #includes in .cpp files because SetVector.h is no longer included.
llvm-svn: 33855
Diffstat (limited to 'llvm/lib/VMCore')
| -rw-r--r-- | llvm/lib/VMCore/Module.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Module.cpp b/llvm/lib/VMCore/Module.cpp index d8c7356757e..efa6e6c7c09 100644 --- a/llvm/lib/VMCore/Module.cpp +++ b/llvm/lib/VMCore/Module.cpp @@ -360,3 +360,20 @@ void Module::dropAllReferences() { I->dropAllReferences(); } +void Module::addLibrary(const std::string& Lib) { + for (Module::lib_iterator I = lib_begin(), E = lib_end(); I != E; ++I) + if (*I == Lib) + return; + LibraryList.push_back(Lib); +} + +void Module::removeLibrary(const std::string& Lib) { + LibraryListType::iterator I = LibraryList.begin(); + LibraryListType::iterator E = LibraryList.end(); + for (;I != E; ++I) + if (*I == Lib) { + LibraryList.erase(I); + return; + } +} + |

