summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore
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
commit3f4e6e84dc72bdd902497f8fe0ca251bee12bd53 (patch)
tree0a9d7a1d25a1d068e2ddf6691e59ede55f3a1d5d /llvm/lib/VMCore
parent09ec2c842a021f7b738259be97b664f4ed73d398 (diff)
downloadbcm5719-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.cpp17
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;
+ }
+}
+
OpenPOWER on IntegriCloud