From 6734b57d1bcd743491b627979f7801f94c97a970 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Sun, 4 Feb 2007 00:40:42 +0000 Subject: 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 --- lib/VMCore/Module.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib/VMCore/Module.cpp') 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; + } +} + -- cgit v1.2.3-18-g5258