[llvm-commits] CVS: llvm/lib/VMCore/Module.cpp

Reid Spencer reid at x10sys.com
Sat Feb 3 16:41:01 PST 2007



Changes in directory llvm/lib/VMCore:

Module.cpp updated: 1.74 -> 1.75
---
Log message:

For PR1163: http://llvm.org/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.


---
Diffs of the changes:  (+17 -0)

 Module.cpp |   17 +++++++++++++++++
 1 files changed, 17 insertions(+)


Index: llvm/lib/VMCore/Module.cpp
diff -u llvm/lib/VMCore/Module.cpp:1.74 llvm/lib/VMCore/Module.cpp:1.75
--- llvm/lib/VMCore/Module.cpp:1.74	Tue Jan 30 14:08:38 2007
+++ llvm/lib/VMCore/Module.cpp	Sat Feb  3 18:40:42 2007
@@ -360,3 +360,20 @@
     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;
+    }
+}
+






More information about the llvm-commits mailing list