aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/Module.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-02-04 00:40:42 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-02-04 00:40:42 +0000
commit6734b57d1bcd743491b627979f7801f94c97a970 (patch)
treeae542628ae9741a7ad07e3483ff7c0952cae6645 /lib/VMCore/Module.cpp
parent5fcaf3ed141a3f0246e41f45077dbb7d7d0b11d3 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33855 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Module.cpp')
-rw-r--r--lib/VMCore/Module.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/VMCore/Module.cpp b/lib/VMCore/Module.cpp
index d8c7356757..efa6e6c7c0 100644
--- a/lib/VMCore/Module.cpp
+++ b/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;
+ }
+}
+