[llvm-commits] CVS: llvm/lib/Transforms/IPO/Internalize.cpp
Devang Patel
dpatel at apple.com
Thu Jul 20 10:48:19 PDT 2006
Changes in directory llvm/lib/Transforms/IPO:
Internalize.cpp updated: 1.32 -> 1.33
---
Log message:
Add new constructor to accept vector of exported names while creating
InternalizePass.
---
Diffs of the changes: (+12 -0)
Internalize.cpp | 12 ++++++++++++
1 files changed, 12 insertions(+)
Index: llvm/lib/Transforms/IPO/Internalize.cpp
diff -u llvm/lib/Transforms/IPO/Internalize.cpp:1.32 llvm/lib/Transforms/IPO/Internalize.cpp:1.33
--- llvm/lib/Transforms/IPO/Internalize.cpp:1.32 Tue Mar 7 14:53:47 2006
+++ llvm/lib/Transforms/IPO/Internalize.cpp Thu Jul 20 12:48:05 2006
@@ -45,6 +45,7 @@
bool DontInternalize;
public:
InternalizePass(bool InternalizeEverything = true);
+ InternalizePass(const std::vector <const char *>& exportList);
void LoadFile(const char *Filename);
virtual bool runOnModule(Module &M);
};
@@ -62,6 +63,13 @@
DontInternalize = true;
}
+InternalizePass::InternalizePass(const std::vector<const char *>&exportList) {
+ for(std::vector<const char *>::const_iterator itr = exportList.begin();
+ itr != exportList.end(); itr++) {
+ ExternalNames.insert(*itr);
+ }
+}
+
void InternalizePass::LoadFile(const char *Filename) {
// Load the APIFile...
std::ifstream In(Filename);
@@ -151,3 +159,7 @@
ModulePass *llvm::createInternalizePass(bool InternalizeEverything) {
return new InternalizePass(InternalizeEverything);
}
+
+ModulePass *llvm::createInternalizePass(const std::vector <const char *> &exportList) {
+ return new InternalizePass(exportList);
+}
More information about the llvm-commits
mailing list