[llvm-commits] [llvm] r169881 - in /llvm/trunk: include/llvm/Transforms/IPO.h lib/Transforms/IPO/Internalize.cpp
Rafael Espindola
rafael.espindola at gmail.com
Tue Dec 11 08:36:02 PST 2012
Author: rafael
Date: Tue Dec 11 10:36:02 2012
New Revision: 169881
URL: http://llvm.org/viewvc/llvm-project?rev=169881&view=rev
Log:
Use an ArrayRef instead of a std::vector&.
Modified:
llvm/trunk/include/llvm/Transforms/IPO.h
llvm/trunk/lib/Transforms/IPO/Internalize.cpp
Modified: llvm/trunk/include/llvm/Transforms/IPO.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/IPO.h?rev=169881&r1=169880&r2=169881&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/IPO.h (original)
+++ llvm/trunk/include/llvm/Transforms/IPO.h Tue Dec 11 10:36:02 2012
@@ -15,7 +15,7 @@
#ifndef LLVM_TRANSFORMS_IPO_H
#define LLVM_TRANSFORMS_IPO_H
-#include <vector>
+#include "llvm/ADT/ArrayRef.h"
namespace llvm {
@@ -109,7 +109,7 @@
///
/// Note that commandline options that are used with the above function are not
/// used now!
-ModulePass *createInternalizePass(const std::vector<const char *> &exportList);
+ModulePass *createInternalizePass(ArrayRef<const char *> exportList);
/// createInternalizePass - Same as above, but with an empty exportList.
ModulePass *createInternalizePass();
Modified: llvm/trunk/lib/Transforms/IPO/Internalize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/Internalize.cpp?rev=169881&r1=169880&r2=169881&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/Internalize.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/Internalize.cpp Tue Dec 11 10:36:02 2012
@@ -48,7 +48,7 @@
public:
static char ID; // Pass identification, replacement for typeid
explicit InternalizePass();
- explicit InternalizePass(const std::vector <const char *>& exportList);
+ explicit InternalizePass(ArrayRef<const char *> exportList);
void LoadFile(const char *Filename);
virtual bool runOnModule(Module &M);
@@ -72,10 +72,10 @@
ExternalNames.insert(APIList.begin(), APIList.end());
}
-InternalizePass::InternalizePass(const std::vector<const char *>&exportList)
+InternalizePass::InternalizePass(ArrayRef<const char *> exportList)
: ModulePass(ID){
initializeInternalizePassPass(*PassRegistry::getPassRegistry());
- for(std::vector<const char *>::const_iterator itr = exportList.begin();
+ for(ArrayRef<const char *>::const_iterator itr = exportList.begin();
itr != exportList.end(); itr++) {
ExternalNames.insert(*itr);
}
@@ -173,6 +173,6 @@
return new InternalizePass();
}
-ModulePass *llvm::createInternalizePass(const std::vector <const char *> &el) {
+ModulePass *llvm::createInternalizePass(ArrayRef<const char *> el) {
return new InternalizePass(el);
}
More information about the llvm-commits
mailing list