diff --git a/include/llvm/Transforms/IPO.h b/include/llvm/Transforms/IPO.h index fc1cd59e4e1..e6eb8d38bb8 100644 --- a/include/llvm/Transforms/IPO.h +++ b/include/llvm/Transforms/IPO.h @@ -15,7 +15,7 @@ #ifndef LLVM_TRANSFORMS_IPO_H #define LLVM_TRANSFORMS_IPO_H -#include +#include "llvm/ADT/ArrayRef.h" namespace llvm { @@ -109,7 +109,7 @@ Pass *createPruneEHPass(); /// /// Note that commandline options that are used with the above function are not /// used now! -ModulePass *createInternalizePass(const std::vector &exportList); +ModulePass *createInternalizePass(ArrayRef exportList); /// createInternalizePass - Same as above, but with an empty exportList. ModulePass *createInternalizePass(); diff --git a/lib/Transforms/IPO/Internalize.cpp b/lib/Transforms/IPO/Internalize.cpp index b2cd3a765a1..bd94f0a252b 100644 --- a/lib/Transforms/IPO/Internalize.cpp +++ b/lib/Transforms/IPO/Internalize.cpp @@ -48,7 +48,7 @@ namespace { public: static char ID; // Pass identification, replacement for typeid explicit InternalizePass(); - explicit InternalizePass(const std::vector & exportList); + explicit InternalizePass(ArrayRef exportList); void LoadFile(const char *Filename); virtual bool runOnModule(Module &M); @@ -72,10 +72,10 @@ InternalizePass::InternalizePass() ExternalNames.insert(APIList.begin(), APIList.end()); } -InternalizePass::InternalizePass(const std::vector&exportList) +InternalizePass::InternalizePass(ArrayRef exportList) : ModulePass(ID){ initializeInternalizePassPass(*PassRegistry::getPassRegistry()); - for(std::vector::const_iterator itr = exportList.begin(); + for(ArrayRef::const_iterator itr = exportList.begin(); itr != exportList.end(); itr++) { ExternalNames.insert(*itr); } @@ -173,6 +173,6 @@ ModulePass *llvm::createInternalizePass() { return new InternalizePass(); } -ModulePass *llvm::createInternalizePass(const std::vector &el) { +ModulePass *llvm::createInternalizePass(ArrayRef el) { return new InternalizePass(el); }