[llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Fri Jul 2 05:46:16 PDT 2004
Changes in directory llvm-java/lib/Compiler:
Compiler.cpp updated: 1.46 -> 1.47
---
Log message:
Don't create a new module for each classfile we compile. Instead pass
it to the compiler's compile function and append to it.
---
Diffs of the changes: (+2 -6)
Index: llvm-java/lib/Compiler/Compiler.cpp
diff -u llvm-java/lib/Compiler/Compiler.cpp:1.46 llvm-java/lib/Compiler/Compiler.cpp:1.47
--- llvm-java/lib/Compiler/Compiler.cpp:1.46 Sat Jun 12 20:06:34 2004
+++ llvm-java/lib/Compiler/Compiler.cpp Fri Jul 2 05:44:49 2004
@@ -712,17 +712,13 @@
delete compilerImpl_;
}
-Module* Compiler::compile(const ClassFile& cf)
+void Compiler::compile(Module& m, const ClassFile& cf)
{
DEBUG(std::cerr << "compiling class: "
<< cf.getThisClass()->getName()->str() << '\n');
- Module* module = new Module(cf.getThisClass()->getName()->str());
-
const Java::Methods& methods = cf.getMethods();
for (Java::Methods::const_iterator
i = methods.begin(), e = methods.end(); i != e; ++i)
- compilerImpl_->compileMethod(*module, cf, **i);
-
- return module;
+ compilerImpl_->compileMethod(m, cf, **i);
}
More information about the llvm-commits
mailing list