#include "llvm/Function.h"
#include "llvm/GlobalVariable.h"
+#include "llvm/ADT/SetVector.h"
namespace llvm {
public:
typedef iplist<GlobalVariable> GlobalListType;
typedef iplist<Function> FunctionListType;
- typedef std::vector<std::string> LibraryListType;
+ typedef SetVector<std::string> LibraryListType;
// Global Variable iterators...
typedef GlobalListType::iterator giterator;
inline unsigned lib_size() const { return LibraryList.size(); }
/// @brief Add a library to the list of dependent libraries
- inline void addLibrary(const std::string& Lib){ LibraryList.push_back(Lib); }
+ inline void addLibrary(const std::string& Lib){ LibraryList.insert(Lib); }
/// @brief Remove a library from the list of dependent libraries
- inline void removeLibrary(const std::string& Lib);
+ inline void removeLibrary(const std::string& Lib) { LibraryList.remove(Lib); }
/// @brief Get all the libraries
inline const LibraryListType& getLibraries() const { return LibraryList; }