[llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp Module.cpp
Reid Spencer
reid at x10sys.com
Mon Sep 13 16:44:33 PDT 2004
Changes in directory llvm/lib/VMCore:
AsmWriter.cpp updated: 1.158 -> 1.159
Module.cpp updated: 1.55 -> 1.56
---
Log message:
Add support for the link-time pass list to Modules.
---
Diffs of the changes: (+20 -0)
Index: llvm/lib/VMCore/AsmWriter.cpp
diff -u llvm/lib/VMCore/AsmWriter.cpp:1.158 llvm/lib/VMCore/AsmWriter.cpp:1.159
--- llvm/lib/VMCore/AsmWriter.cpp:1.158 Wed Sep 1 17:55:36 2004
+++ llvm/lib/VMCore/AsmWriter.cpp Mon Sep 13 18:44:23 2004
@@ -777,6 +777,20 @@
}
Out << " ]\n";
}
+
+ // Loop over the link time pass list and emit them
+ Module::pass_iterator PI = M->pass_begin();
+ Module::pass_iterator PE = M->pass_end();
+ if (LI != LE) {
+ Out << "passes = [\n";
+ while (LI != LE) {
+ Out << "\"" << *LI << "\"";
+ ++LI;
+ if (LI != LE)
+ Out << ",\n";
+ }
+ Out << " ]\n";
+ }
// Loop over the symbol table, emitting all named constants...
printSymbolTable(M->getSymbolTable());
Index: llvm/lib/VMCore/Module.cpp
diff -u llvm/lib/VMCore/Module.cpp:1.55 llvm/lib/VMCore/Module.cpp:1.56
--- llvm/lib/VMCore/Module.cpp:1.55 Wed Sep 1 17:55:37 2004
+++ llvm/lib/VMCore/Module.cpp Mon Sep 13 18:44:23 2004
@@ -270,6 +270,12 @@
return ""; // Must not have found anything...
}
+void Module::removePass(const std::string& Lib) {
+ PassListType::iterator I = find(PassList.begin(),PassList.end(),Lib);
+ if (I != PassList.end())
+ PassList.erase(I);
+}
+
//===----------------------------------------------------------------------===//
// Other module related stuff.
More information about the llvm-commits
mailing list