[cfe-commits] r57924 - in /cfe/trunk: include/clang/CodeGen/ModuleBuilder.h lib/CodeGen/ModuleBuilder.cpp
Daniel Dunbar
daniel at zuster.org
Tue Oct 21 12:55:10 PDT 2008
Author: ddunbar
Date: Tue Oct 21 14:55:09 2008
New Revision: 57924
URL: http://llvm.org/viewvc/llvm-project?rev=57924&view=rev
Log:
Add GetModule accessor to ModuleBuilder
Modified:
cfe/trunk/include/clang/CodeGen/ModuleBuilder.h
cfe/trunk/lib/CodeGen/ModuleBuilder.cpp
Modified: cfe/trunk/include/clang/CodeGen/ModuleBuilder.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/CodeGen/ModuleBuilder.h?rev=57924&r1=57923&r2=57924&view=diff
==============================================================================
--- cfe/trunk/include/clang/CodeGen/ModuleBuilder.h (original)
+++ cfe/trunk/include/clang/CodeGen/ModuleBuilder.h Tue Oct 21 14:55:09 2008
@@ -26,8 +26,9 @@
struct LangOptions;
class CodeGenerator : public ASTConsumer {
- public:
- virtual llvm::Module* ReleaseModule() = 0;
+ public:
+ virtual llvm::Module* GetModule() = 0;
+ virtual llvm::Module* ReleaseModule() = 0;
};
CodeGenerator *CreateLLVMCodeGen(Diagnostic &Diags,
Modified: cfe/trunk/lib/CodeGen/ModuleBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/ModuleBuilder.cpp?rev=57924&r1=57923&r2=57924&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/ModuleBuilder.cpp (original)
+++ cfe/trunk/lib/CodeGen/ModuleBuilder.cpp Tue Oct 21 14:55:09 2008
@@ -48,6 +48,10 @@
virtual ~CodeGeneratorImpl() {}
+ virtual llvm::Module* GetModule() {
+ return M.get();
+ }
+
virtual llvm::Module* ReleaseModule() {
return M.take();
}
More information about the cfe-commits
mailing list