From 1b0a1b7dcf077cbab1975dc22cb00c0b8898f05b Mon Sep 17 00:00:00 2001 From: Logan Chien Date: Thu, 15 Mar 2012 06:20:17 +0800 Subject: Remove the hard coded "constants" related to shadow frame. (cherry picked from commit ae63b2a5ae3fa64bc07369c22efcf5617d55cc16) Change-Id: I4f00bcda535b080fd0acb586ef699d101a418675 --- src/compiler_llvm/ir_builder.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/compiler_llvm/ir_builder.cc') diff --git a/src/compiler_llvm/ir_builder.cc b/src/compiler_llvm/ir_builder.cc index 6612911d35..1a27d0258f 100644 --- a/src/compiler_llvm/ir_builder.cc +++ b/src/compiler_llvm/ir_builder.cc @@ -33,7 +33,7 @@ IRBuilder::IRBuilder(llvm::LLVMContext& context, llvm::Module& module) // Get java object type from module llvm::Type* jobject_struct_type = module.getTypeByName("JavaObject"); - CHECK_NE(jobject_struct_type, static_cast(NULL)); + CHECK(jobject_struct_type != NULL); jobject_type_ = jobject_struct_type->getPointerTo(); // Create JEnv* type @@ -41,8 +41,8 @@ IRBuilder::IRBuilder(llvm::LLVMContext& context, llvm::Module& module) jenv_type_ = jenv_struct_type->getPointerTo(); // Get Art shadow frame struct type from module - art_frame_type_ = module.getTypeByName("ArtFrame"); - CHECK_NE(art_frame_type_, static_cast(NULL)); + art_frame_type_ = module.getTypeByName("ShadowFrame"); + CHECK(art_frame_type_ != NULL); // Load the runtime support function declaration from module InitRuntimeSupportFuncDecl(); @@ -185,7 +185,7 @@ llvm::Type* IRBuilder::getJTypeInArraySpace(JType jty) { llvm::StructType* IRBuilder::getShadowFrameTy(uint32_t sirt_size) { - std::string name(StringPrintf("ArtFrame%u", sirt_size)); + std::string name(StringPrintf("ShadowFrame%u", sirt_size)); // Try to find the existing struct type definition if (llvm::Type* type = module_->getTypeByName(name)) { -- cgit v1.2.3-59-g8ed1b