diff options
| author | 2012-02-17 18:43:48 +0800 | |
|---|---|---|
| committer | 2012-02-19 03:49:06 -0800 | |
| commit | 6a91799974e992e915facb9d9372dc8847a09a64 (patch) | |
| tree | ae6aabff12aa650f6af405daa3e6d339c02fb1d3 /src/compiler_llvm/ir_builder.cc | |
| parent | 90d5099d1d89bbc6ef976f8ad48fe5d7060788a9 (diff) | |
Add Module as a member of IRBuilder.
Change-Id: I62704b0a33b166f577fd8675bedac8f998d51294
Diffstat (limited to 'src/compiler_llvm/ir_builder.cc')
| -rw-r--r-- | src/compiler_llvm/ir_builder.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler_llvm/ir_builder.cc b/src/compiler_llvm/ir_builder.cc index 4c432718ac..582af65a41 100644 --- a/src/compiler_llvm/ir_builder.cc +++ b/src/compiler_llvm/ir_builder.cc @@ -28,7 +28,7 @@ namespace compiler_llvm { //---------------------------------------------------------------------------- IRBuilder::IRBuilder(llvm::LLVMContext& context, llvm::Module& module) -: LLVMIRBuilder(context) { +: LLVMIRBuilder(context), module_(&module) { // Get java object type from module llvm::Type* jobject_struct_type = module.getTypeByName("JavaObject"); @@ -40,7 +40,7 @@ IRBuilder::IRBuilder(llvm::LLVMContext& context, llvm::Module& module) jenv_type_ = jenv_struct_type->getPointerTo(); // Load the runtime support function declaration from module - InitRuntimeSupportFuncDecl(module); + InitRuntimeSupportFuncDecl(); } @@ -48,12 +48,12 @@ IRBuilder::IRBuilder(llvm::LLVMContext& context, llvm::Module& module) // Runtime Helper Function //---------------------------------------------------------------------------- -void IRBuilder::InitRuntimeSupportFuncDecl(llvm::Module& module) { +void IRBuilder::InitRuntimeSupportFuncDecl() { using namespace runtime_support; #define GET_RUNTIME_SUPPORT_FUNC_DECL(ID, NAME) \ do { \ - llvm::Function* fn = module.getFunction(NAME); \ + llvm::Function* fn = module_->getFunction(NAME); \ DCHECK_NE(fn, (void*)NULL) << "Function not found: " << NAME; \ runtime_support_func_decls_[ID] = fn; \ } while (0); |