[llvm-commits] CVS: llvm/tools/lto/lto.cpp
Devang Patel
dpatel at apple.com
Mon Oct 23 16:12:41 PDT 2006
Changes in directory llvm/tools/lto:
lto.cpp updated: 1.20 -> 1.21
---
Log message:
Add removeModule().
---
Diffs of the changes: (+12 -0)
lto.cpp | 12 ++++++++++++
1 files changed, 12 insertions(+)
Index: llvm/tools/lto/lto.cpp
diff -u llvm/tools/lto/lto.cpp:1.20 llvm/tools/lto/lto.cpp:1.21
--- llvm/tools/lto/lto.cpp:1.20 Mon Oct 9 16:16:05 2006
+++ llvm/tools/lto/lto.cpp Mon Oct 23 18:12:26 2006
@@ -102,6 +102,18 @@
findExternalRefs(c->getOperand(i), references, mangler);
}
+/// If Moduel with InputFilename is available then remove it.
+void
+LTO::removeModule (const std::string &InputFilename)
+{
+ NameToModuleMap::iterator pos = allModules.find(InputFilename.c_str());
+ if (pos != allModules.end()) {
+ Module *m = allModules[InputFilename.c_str()];
+ allModules.erase(pos);
+ delete m;
+ }
+}
+
/// InputFilename is a LLVM bytecode file. If Module with InputFilename is
/// available then return it. Otherwise parseInputFilename.
Module *
More information about the llvm-commits
mailing list