diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Instrumentation/RSProfiling.h | 1 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 1 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Utils/LowerInvoke.cpp | 1 | ||||
| -rw-r--r-- | llvm/lib/VMCore/Module.cpp | 17 |
5 files changed, 21 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/RSProfiling.h b/llvm/lib/Transforms/Instrumentation/RSProfiling.h index e07db004523..747773a87c5 100644 --- a/llvm/lib/Transforms/Instrumentation/RSProfiling.h +++ b/llvm/lib/Transforms/Instrumentation/RSProfiling.h @@ -11,6 +11,7 @@ // //===----------------------------------------------------------------------===// #include "llvm/Transforms/RSProfiling.h" +#include <set> namespace llvm { /// RSProfilers_std - a simple support class for profilers that handles most diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 49a17750478..fe9a003f2fe 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -54,6 +54,7 @@ #include "llvm/ADT/Statistic.h" #include "llvm/ADT/STLExtras.h" #include <algorithm> +#include <set> using namespace llvm; using namespace llvm::PatternMatch; diff --git a/llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp b/llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp index aecd6957bd5..a11d5bdfcdf 100644 --- a/llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp +++ b/llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp @@ -76,7 +76,7 @@ #include "llvm/Pass.h" #include "llvm/ADT/DepthFirstIterator.h" #include "llvm/ADT/SetOperations.h" -#include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/SetVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Analysis/Dominators.h" diff --git a/llvm/lib/Transforms/Utils/LowerInvoke.cpp b/llvm/lib/Transforms/Utils/LowerInvoke.cpp index a027743bda7..62eec75160a 100644 --- a/llvm/lib/Transforms/Utils/LowerInvoke.cpp +++ b/llvm/lib/Transforms/Utils/LowerInvoke.cpp @@ -48,6 +48,7 @@ #include "llvm/Support/Compiler.h" #include "llvm/Target/TargetLowering.h" #include <csetjmp> +#include <set> using namespace llvm; STATISTIC(NumInvokes, "Number of invokes replaced"); 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; + } +} + |

