diff options
Diffstat (limited to 'lib/VMCore/Module.cpp')
-rw-r--r-- | lib/VMCore/Module.cpp | 17 |
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; + } +} + |