Code cleanup: Use "const T*" instead of "T const*"

Change-Id: I97d205df7d659e5670009df21b8c20b1d8224133
diff --git a/src/compiler_llvm/compilation_unit.cc b/src/compiler_llvm/compilation_unit.cc
index 8aae161..f84ebf4 100644
--- a/src/compiler_llvm/compilation_unit.cc
+++ b/src/compiler_llvm/compilation_unit.cc
@@ -221,9 +221,9 @@
 
 bool CompilationUnit::MaterializeToRawOStream(llvm::raw_ostream& out_stream) {
   // Lookup the LLVM target
-  char const* target_triple = NULL;
-  char const* target_cpu = "";
-  char const* target_attr = NULL;
+  const char* target_triple = NULL;
+  const char* target_cpu = "";
+  const char* target_attr = NULL;
 
   InstructionSet insn_set = GetInstructionSet();
   switch (insn_set) {
@@ -256,7 +256,7 @@
   }
 
   std::string errmsg;
-  llvm::Target const* target =
+  const llvm::Target* target =
     llvm::TargetRegistry::lookupTarget(target_triple, errmsg);
 
   CHECK(target != NULL) << errmsg;
@@ -278,7 +278,7 @@
   CHECK(target_machine.get() != NULL) << "Failed to create target machine";
 
   // Add target data
-  llvm::TargetData const* target_data = target_machine->getTargetData();
+  const llvm::TargetData* target_data = target_machine->getTargetData();
 
   // PassManager for code generation passes
   llvm::PassManager pm;
diff --git a/src/compiler_llvm/jni_compiler.cc b/src/compiler_llvm/jni_compiler.cc
index f4f5be5..b96e0be 100644
--- a/src/compiler_llvm/jni_compiler.cc
+++ b/src/compiler_llvm/jni_compiler.cc
@@ -294,7 +294,7 @@
   DexFile::MethodId const& method_id = dex_file_->GetMethodId(method_idx);
 
   uint32_t shorty_size;
-  char const* shorty = dex_file_->GetMethodShorty(method_id, &shorty_size);
+  const char* shorty = dex_file_->GetMethodShorty(method_id, &shorty_size);
   CHECK_GE(shorty_size, 1u);
 
   // Get return type
diff --git a/src/compiler_llvm/jni_compiler.h b/src/compiler_llvm/jni_compiler.h
index 15a789c..15c9810 100644
--- a/src/compiler_llvm/jni_compiler.h
+++ b/src/compiler_llvm/jni_compiler.h
@@ -63,7 +63,7 @@
 
  private:
   CompilationUnit* cunit_;
-  Compiler const* compiler_;
+  const Compiler* compiler_;
 
   llvm::Module* module_;
   llvm::LLVMContext* context_;
@@ -74,9 +74,9 @@
   uint32_t access_flags_;
   uint32_t method_idx_;
   ClassLinker * class_linker_;
-  ClassLoader const* class_loader_;
-  DexCache const* dex_cache_;
-  DexFile const* dex_file_;
+  const ClassLoader* class_loader_;
+  const DexCache* dex_cache_;
+  const DexFile* dex_file_;
   Method* method_;
 
   llvm::Function* func_;
diff --git a/src/compiler_llvm/method_compiler.cc b/src/compiler_llvm/method_compiler.cc
index 13f2327..58d5c33 100644
--- a/src/compiler_llvm/method_compiler.cc
+++ b/src/compiler_llvm/method_compiler.cc
@@ -121,7 +121,7 @@
   DexFile::MethodId const& method_id = dex_file_->GetMethodId(method_idx);
 
   uint32_t shorty_size;
-  char const* shorty = dex_file_->GetMethodShorty(method_id, &shorty_size);
+  const char* shorty = dex_file_->GetMethodShorty(method_id, &shorty_size);
   CHECK_GE(shorty_size, 1u);
 
   // Get return type
@@ -324,7 +324,7 @@
   llvm::Function::arg_iterator arg_end(func_->arg_end());
 
   uint32_t shorty_size = 0;
-  char const* shorty = oat_compilation_unit_->GetShorty(&shorty_size);
+  const char* shorty = oat_compilation_unit_->GetShorty(&shorty_size);
   CHECK_GE(shorty_size, 1u);
 
   ++arg_iter; // skip method object
@@ -353,7 +353,7 @@
 void MethodCompiler::EmitInstructions() {
   uint32_t dex_pc = 0;
   while (dex_pc < code_item_->insns_size_in_code_units_) {
-    Instruction const* insn = Instruction::At(code_item_->insns_ + dex_pc);
+    const Instruction* insn = Instruction::At(code_item_->insns_ + dex_pc);
     EmitInstruction(dex_pc, insn);
     dex_pc += insn->SizeInCodeUnits();
   }
@@ -361,7 +361,7 @@
 
 
 void MethodCompiler::EmitInstruction(uint32_t dex_pc,
-                                     Instruction const* insn) {
+                                     const Instruction* insn) {
 
   // Set the IRBuilder insertion point
   irb_.SetInsertPoint(GetBasicBlock(dex_pc));
@@ -1218,7 +1218,7 @@
 
 
 void MethodCompiler::EmitInsn_Nop(uint32_t dex_pc,
-                                  Instruction const* insn) {
+                                  const Instruction* insn) {
 
   uint16_t insn_signature = code_item_->insns_[dex_pc];
 
@@ -1233,7 +1233,7 @@
 
 
 void MethodCompiler::EmitInsn_Move(uint32_t dex_pc,
-                                   Instruction const* insn,
+                                   const Instruction* insn,
                                    JType jty) {
 
   DecodedInstruction dec_insn(insn);
@@ -1246,7 +1246,7 @@
 
 
 void MethodCompiler::EmitInsn_MoveResult(uint32_t dex_pc,
-                                         Instruction const* insn,
+                                         const Instruction* insn,
                                          JType jty) {
 
   DecodedInstruction dec_insn(insn);
@@ -1259,7 +1259,7 @@
 
 
 void MethodCompiler::EmitInsn_MoveException(uint32_t dex_pc,
-                                            Instruction const* insn) {
+                                            const Instruction* insn) {
 
   DecodedInstruction dec_insn(insn);
 
@@ -1282,7 +1282,7 @@
 
 
 void MethodCompiler::EmitInsn_ThrowException(uint32_t dex_pc,
-                                             Instruction const* insn) {
+                                             const Instruction* insn) {
 
   DecodedInstruction dec_insn(insn);
 
@@ -1298,7 +1298,7 @@
 
 
 void MethodCompiler::EmitInsn_ThrowVerificationError(uint32_t dex_pc,
-                                                     Instruction const* insn) {
+                                                     const Instruction* insn) {
 
   DecodedInstruction dec_insn(insn);
 
@@ -1316,7 +1316,7 @@
 
 
 void MethodCompiler::EmitInsn_ReturnVoid(uint32_t dex_pc,
-                                         Instruction const* insn) {
+                                         const Instruction* insn) {
   // Pop the shadow frame
   EmitPopShadowFrame();
 
@@ -1326,7 +1326,7 @@
 
 
 void MethodCompiler::EmitInsn_Return(uint32_t dex_pc,
-                                     Instruction const* insn) {
+                                     const Instruction* insn) {
 
   DecodedInstruction dec_insn(insn);
 
@@ -1344,7 +1344,7 @@
 
 
 void MethodCompiler::EmitInsn_LoadConstant(uint32_t dex_pc,
-                                           Instruction const* insn,
+                                           const Instruction* insn,
                                            JType imm_jty) {
 
   DecodedInstruction dec_insn(insn);
@@ -1399,7 +1399,7 @@
 
 
 void MethodCompiler::EmitInsn_LoadConstantString(uint32_t dex_pc,
-                                                 Instruction const* insn) {
+                                                 const Instruction* insn) {
 
   DecodedInstruction dec_insn(insn);
 
@@ -1533,7 +1533,7 @@
 
 
 void MethodCompiler::EmitInsn_LoadConstantClass(uint32_t dex_pc,
-                                                Instruction const* insn) {
+                                                const Instruction* insn) {
 
   DecodedInstruction dec_insn(insn);
 
@@ -1545,7 +1545,7 @@
 
 
 void MethodCompiler::EmitInsn_MonitorEnter(uint32_t dex_pc,
-                                           Instruction const* insn) {
+                                           const Instruction* insn) {
 
   DecodedInstruction dec_insn(insn);
 
@@ -1563,7 +1563,7 @@
 
 
 void MethodCompiler::EmitInsn_MonitorExit(uint32_t dex_pc,
-                                          Instruction const* insn) {
+                                          const Instruction* insn) {
 
   DecodedInstruction dec_insn(insn);
 
@@ -1585,7 +1585,7 @@
 
 
 void MethodCompiler::EmitInsn_CheckCast(uint32_t dex_pc,
-                                        Instruction const* insn) {
+                                        const Instruction* insn) {
 
   DecodedInstruction dec_insn(insn);
 
@@ -1640,7 +1640,7 @@
 
 
 void MethodCompiler::EmitInsn_InstanceOf(uint32_t dex_pc,
-                                         Instruction const* insn) {
+                                         const Instruction* insn) {
 
   DecodedInstruction dec_insn(insn);
 
@@ -1719,7 +1719,7 @@
 
 
 void MethodCompiler::EmitInsn_ArrayLength(uint32_t dex_pc,
-                                          Instruction const* insn) {
+                                          const Instruction* insn) {
 
   DecodedInstruction dec_insn(insn);
 
@@ -1736,7 +1736,7 @@
 
 
 void MethodCompiler::EmitInsn_NewInstance(uint32_t dex_pc,
-                                          Instruction const* insn) {
+                                          const Instruction* insn) {
 
   DecodedInstruction dec_insn(insn);
 
@@ -1810,7 +1810,7 @@
 
 
 void MethodCompiler::EmitInsn_NewArray(uint32_t dex_pc,
-                                       Instruction const* insn) {
+                                       const Instruction* insn) {
 
   DecodedInstruction dec_insn(insn);
 
@@ -1824,7 +1824,7 @@
 
 
 void MethodCompiler::EmitInsn_FilledNewArray(uint32_t dex_pc,
-                                             Instruction const* insn,
+                                             const Instruction* insn,
                                              bool is_range) {
 
   DecodedInstruction dec_insn(insn);
@@ -1898,7 +1898,7 @@
 
 
 void MethodCompiler::EmitInsn_FillArrayData(uint32_t dex_pc,
-                                            Instruction const* insn) {
+                                            const Instruction* insn) {
 
   DecodedInstruction dec_insn(insn);
 
@@ -1942,7 +1942,7 @@
 
 
 void MethodCompiler::EmitInsn_UnconditionalBranch(uint32_t dex_pc,
-                                                  Instruction const* insn) {
+                                                  const Instruction* insn) {
 
   DecodedInstruction dec_insn(insn);
 
@@ -1953,7 +1953,7 @@
 
 
 void MethodCompiler::EmitInsn_PackedSwitch(uint32_t dex_pc,
-                                           Instruction const* insn) {
+                                           const Instruction* insn) {
 
   DecodedInstruction dec_insn(insn);
 
@@ -1977,7 +1977,7 @@
 
 
 void MethodCompiler::EmitInsn_SparseSwitch(uint32_t dex_pc,
-                                           Instruction const* insn) {
+                                           const Instruction* insn) {
 
   DecodedInstruction dec_insn(insn);
 
@@ -2003,7 +2003,7 @@
 
 
 void MethodCompiler::EmitInsn_FPCompare(uint32_t dex_pc,
-                                        Instruction const* insn,
+                                        const Instruction* insn,
                                         JType fp_jty,
                                         bool gt_bias) {
 
@@ -2031,7 +2031,7 @@
 
 
 void MethodCompiler::EmitInsn_LongCompare(uint32_t dex_pc,
-                                          Instruction const* insn) {
+                                          const Instruction* insn) {
 
   DecodedInstruction dec_insn(insn);
 
@@ -2063,7 +2063,7 @@
 
 
 void MethodCompiler::EmitInsn_BinaryConditionalBranch(uint32_t dex_pc,
-                                                      Instruction const* insn,
+                                                      const Instruction* insn,
                                                       CondBranchKind cond) {
 
   DecodedInstruction dec_insn(insn);
@@ -2127,7 +2127,7 @@
 
 
 void MethodCompiler::EmitInsn_UnaryConditionalBranch(uint32_t dex_pc,
-                                                     Instruction const* insn,
+                                                     const Instruction* insn,
                                                      CondBranchKind cond) {
 
   DecodedInstruction dec_insn(insn);
@@ -2161,10 +2161,10 @@
                     GetNextBasicBlock(dex_pc));
 }
 
-InferredRegCategoryMap const* MethodCompiler::GetInferredRegCategoryMap() {
+const InferredRegCategoryMap* MethodCompiler::GetInferredRegCategoryMap() {
   Compiler::MethodReference mref(dex_file_, method_idx_);
 
-  InferredRegCategoryMap const* map =
+  const InferredRegCategoryMap* map =
     verifier::MethodVerifier::GetInferredRegCategoryMap(mref);
 
   CHECK_NE(map, static_cast<InferredRegCategoryMap*>(NULL));
@@ -2174,13 +2174,13 @@
 
 RegCategory MethodCompiler::GetInferredRegCategory(uint32_t dex_pc,
                                                    uint16_t reg_idx) {
-  InferredRegCategoryMap const* map = GetInferredRegCategoryMap();
+  const InferredRegCategoryMap* map = GetInferredRegCategoryMap();
 
   return map->GetRegCategory(dex_pc, reg_idx);
 }
 
 bool MethodCompiler::IsRegCanBeObject(uint16_t reg_idx) {
-  InferredRegCategoryMap const* map = GetInferredRegCategoryMap();
+  const InferredRegCategoryMap* map = GetInferredRegCategoryMap();
 
   return map->IsRegCanBeObject(reg_idx);
 }
@@ -2282,7 +2282,7 @@
 
 
 void MethodCompiler::EmitInsn_AGet(uint32_t dex_pc,
-                                   Instruction const* insn,
+                                   const Instruction* insn,
                                    JType elem_jty) {
 
   DecodedInstruction dec_insn(insn);
@@ -2303,7 +2303,7 @@
 
 
 void MethodCompiler::EmitInsn_APut(uint32_t dex_pc,
-                                   Instruction const* insn,
+                                   const Instruction* insn,
                                    JType elem_jty) {
 
   DecodedInstruction dec_insn(insn);
@@ -2334,7 +2334,7 @@
 
 
 void MethodCompiler::EmitInsn_IGet(uint32_t dex_pc,
-                                   Instruction const* insn,
+                                   const Instruction* insn,
                                    JType field_jty) {
 
   DecodedInstruction dec_insn(insn);
@@ -2400,7 +2400,7 @@
 
 
 void MethodCompiler::EmitInsn_IPut(uint32_t dex_pc,
-                                   Instruction const* insn,
+                                   const Instruction* insn,
                                    JType field_jty) {
 
   DecodedInstruction dec_insn(insn);
@@ -2524,7 +2524,7 @@
 
 
 void MethodCompiler::EmitInsn_SGet(uint32_t dex_pc,
-                                   Instruction const* insn,
+                                   const Instruction* insn,
                                    JType field_jty) {
 
   DecodedInstruction dec_insn(insn);
@@ -2603,7 +2603,7 @@
 
 
 void MethodCompiler::EmitInsn_SPut(uint32_t dex_pc,
-                                   Instruction const* insn,
+                                   const Instruction* insn,
                                    JType field_jty) {
 
   DecodedInstruction dec_insn(insn);
@@ -2695,7 +2695,7 @@
     dex_file_->GetMethodId(callee_method_idx);
 
   uint32_t shorty_size;
-  char const* shorty = dex_file_->GetMethodShorty(method_id, &shorty_size);
+  const char* shorty = dex_file_->GetMethodShorty(method_id, &shorty_size);
   CHECK_GE(shorty_size, 1u);
 
   // Load argument values according to the shorty (without "this")
@@ -2728,7 +2728,7 @@
 
 
 void MethodCompiler::EmitInsn_Invoke(uint32_t dex_pc,
-                                     Instruction const* insn,
+                                     const Instruction* insn,
                                      InvokeType invoke_type,
                                      InvokeArgFmt arg_fmt) {
   DecodedInstruction dec_insn(insn);
@@ -2965,7 +2965,7 @@
 
 
 void MethodCompiler::EmitInsn_Neg(uint32_t dex_pc,
-                                  Instruction const* insn,
+                                  const Instruction* insn,
                                   JType op_jty) {
 
   DecodedInstruction dec_insn(insn);
@@ -2981,7 +2981,7 @@
 
 
 void MethodCompiler::EmitInsn_Not(uint32_t dex_pc,
-                                  Instruction const* insn,
+                                  const Instruction* insn,
                                   JType op_jty) {
 
   DecodedInstruction dec_insn(insn);
@@ -2999,7 +2999,7 @@
 
 
 void MethodCompiler::EmitInsn_SExt(uint32_t dex_pc,
-                                   Instruction const* insn) {
+                                   const Instruction* insn) {
 
   DecodedInstruction dec_insn(insn);
 
@@ -3012,7 +3012,7 @@
 
 
 void MethodCompiler::EmitInsn_Trunc(uint32_t dex_pc,
-                                    Instruction const* insn) {
+                                    const Instruction* insn) {
 
   DecodedInstruction dec_insn(insn);
 
@@ -3025,7 +3025,7 @@
 
 
 void MethodCompiler::EmitInsn_TruncAndSExt(uint32_t dex_pc,
-                                           Instruction const* insn,
+                                           const Instruction* insn,
                                            unsigned N) {
 
   DecodedInstruction dec_insn(insn);
@@ -3044,7 +3044,7 @@
 
 
 void MethodCompiler::EmitInsn_TruncAndZExt(uint32_t dex_pc,
-                                           Instruction const* insn,
+                                           const Instruction* insn,
                                            unsigned N) {
 
   DecodedInstruction dec_insn(insn);
@@ -3063,7 +3063,7 @@
 
 
 void MethodCompiler::EmitInsn_FNeg(uint32_t dex_pc,
-                                   Instruction const* insn,
+                                   const Instruction* insn,
                                    JType op_jty) {
 
   DecodedInstruction dec_insn(insn);
@@ -3079,7 +3079,7 @@
 
 
 void MethodCompiler::EmitInsn_IntToFP(uint32_t dex_pc,
-                                      Instruction const* insn,
+                                      const Instruction* insn,
                                       JType src_jty,
                                       JType dest_jty) {
 
@@ -3098,7 +3098,7 @@
 
 
 void MethodCompiler::EmitInsn_FPToInt(uint32_t dex_pc,
-                                      Instruction const* insn,
+                                      const Instruction* insn,
                                       JType src_jty,
                                       JType dest_jty,
                                       runtime_support::RuntimeId runtime_func_id) {
@@ -3117,7 +3117,7 @@
 
 
 void MethodCompiler::EmitInsn_FExt(uint32_t dex_pc,
-                                   Instruction const* insn) {
+                                   const Instruction* insn) {
 
   DecodedInstruction dec_insn(insn);
 
@@ -3130,7 +3130,7 @@
 
 
 void MethodCompiler::EmitInsn_FTrunc(uint32_t dex_pc,
-                                     Instruction const* insn) {
+                                     const Instruction* insn) {
 
   DecodedInstruction dec_insn(insn);
 
@@ -3143,7 +3143,7 @@
 
 
 void MethodCompiler::EmitInsn_IntArithm(uint32_t dex_pc,
-                                        Instruction const* insn,
+                                        const Instruction* insn,
                                         IntArithmKind arithm,
                                         JType op_jty,
                                         bool is_2addr) {
@@ -3174,7 +3174,7 @@
 
 
 void MethodCompiler::EmitInsn_IntArithmImmediate(uint32_t dex_pc,
-                                                 Instruction const* insn,
+                                                 const Instruction* insn,
                                                  IntArithmKind arithm) {
 
   DecodedInstruction dec_insn(insn);
@@ -3292,7 +3292,7 @@
 
 
 void MethodCompiler::EmitInsn_IntShiftArithm(uint32_t dex_pc,
-                                             Instruction const* insn,
+                                             const Instruction* insn,
                                              IntShiftArithmKind arithm,
                                              JType op_jty,
                                              bool is_2addr) {
@@ -3326,7 +3326,7 @@
 
 void MethodCompiler::
 EmitInsn_IntShiftArithmImmediate(uint32_t dex_pc,
-                                 Instruction const* insn,
+                                 const Instruction* insn,
                                  IntShiftArithmKind arithm) {
 
   DecodedInstruction dec_insn(insn);
@@ -3378,7 +3378,7 @@
 
 
 void MethodCompiler::EmitInsn_RSubImmediate(uint32_t dex_pc,
-                                            Instruction const* insn) {
+                                            const Instruction* insn) {
 
   DecodedInstruction dec_insn(insn);
 
@@ -3392,7 +3392,7 @@
 
 
 void MethodCompiler::EmitInsn_FPArithm(uint32_t dex_pc,
-                                       Instruction const* insn,
+                                       const Instruction* insn,
                                        FPArithmKind arithm,
                                        JType op_jty,
                                        bool is_2addr) {
@@ -3586,7 +3586,7 @@
 
 void MethodCompiler::EmitGuard_ExceptionLandingPad(uint32_t dex_pc, bool can_skip_unwind) {
   llvm::BasicBlock* lpad = GetLandingPadBasicBlock(dex_pc);
-  Instruction const* insn = Instruction::At(code_item_->insns_ + dex_pc);
+  const Instruction* insn = Instruction::At(code_item_->insns_ + dex_pc);
   if (lpad == NULL && can_skip_unwind &&
       IsInstructionDirectToReturn(dex_pc + insn->SizeInCodeUnits())) {
     return;
@@ -3617,7 +3617,7 @@
 
 
 llvm::BasicBlock* MethodCompiler::
-CreateBasicBlockWithDexPC(uint32_t dex_pc, char const* postfix) {
+CreateBasicBlockWithDexPC(uint32_t dex_pc, const char* postfix) {
   std::string name;
 
 #if !defined(NDEBUG)
@@ -3648,7 +3648,7 @@
 
 llvm::BasicBlock*
 MethodCompiler::GetNextBasicBlock(uint32_t dex_pc) {
-  Instruction const* insn = Instruction::At(code_item_->insns_ + dex_pc);
+  const Instruction* insn = Instruction::At(code_item_->insns_ + dex_pc);
   return GetBasicBlock(dex_pc + insn->SizeInCodeUnits());
 }
 
@@ -3664,7 +3664,7 @@
   while (min <= max) {
     int32_t mid = min + (max - min) / 2;
 
-    DexFile::TryItem const* ti = DexFile::GetTryItems(*code_item_, mid);
+    const DexFile::TryItem* ti = DexFile::GetTryItems(*code_item_, mid);
     uint32_t start = ti->start_addr_;
     uint32_t end = start + ti->insn_count_;
 
@@ -3700,7 +3700,7 @@
   }
 
   // Get try item from code item
-  DexFile::TryItem const* ti = DexFile::GetTryItems(*code_item_, ti_offset);
+  const DexFile::TryItem* ti = DexFile::GetTryItems(*code_item_, ti_offset);
 
   std::string lpadname;
 
@@ -4106,7 +4106,7 @@
       return false;
     }
 
-    Instruction const* insn = Instruction::At(code_item_->insns_ + dex_pc);
+    const Instruction* insn = Instruction::At(code_item_->insns_ + dex_pc);
 
     if (insn->IsReturn()) {
       return true;
@@ -4157,7 +4157,7 @@
   std::vector<bool>& set_to_another_object = method_info_.set_to_another_object;
   set_to_another_object.resize(code_item_->registers_size_, false);
 
-  Instruction const* insn;
+  const Instruction* insn;
   for (uint32_t dex_pc = 0;
        dex_pc < code_item_->insns_size_in_code_units_;
        dex_pc += insn->SizeInCodeUnits()) {
diff --git a/src/compiler_llvm/method_compiler.h b/src/compiler_llvm/method_compiler.h
index 41c43f0..dbdcb52 100644
--- a/src/compiler_llvm/method_compiler.h
+++ b/src/compiler_llvm/method_compiler.h
@@ -94,7 +94,7 @@
   void EmitPrologueAllocShadowFrame();
   void EmitPrologueAssignArgRegister();
   void EmitInstructions();
-  void EmitInstruction(uint32_t dex_pc, Instruction const* insn);
+  void EmitInstruction(uint32_t dex_pc, const Instruction* insn);
 
   enum CondBranchKind {
     kCondBranch_EQ,
@@ -135,7 +135,7 @@
     kArgRange,
   };
 
-#define GEN_INSN_ARGS uint32_t dex_pc, Instruction const* insn
+#define GEN_INSN_ARGS uint32_t dex_pc, const Instruction* insn
 
   // NOP, PAYLOAD (unreachable) instructions
   void EmitInsn_Nop(GEN_INSN_ARGS);
@@ -364,7 +364,7 @@
 
   RegCategory GetInferredRegCategory(uint32_t dex_pc, uint16_t reg);
 
-  InferredRegCategoryMap const* GetInferredRegCategoryMap();
+  const InferredRegCategoryMap* GetInferredRegCategoryMap();
 
   bool IsRegCanBeObject(uint16_t reg_idx);
 
@@ -375,7 +375,7 @@
   llvm::BasicBlock* GetNextBasicBlock(uint32_t dex_pc);
 
   llvm::BasicBlock* CreateBasicBlockWithDexPC(uint32_t dex_pc,
-                                              char const* postfix = NULL);
+                                              const char* postfix = NULL);
 
   int32_t GetTryItemOffset(uint32_t dex_pc);
 
@@ -442,11 +442,11 @@
   Compiler* compiler_;
 
   ClassLinker* class_linker_;
-  ClassLoader const* class_loader_;
+  const ClassLoader* class_loader_;
 
-  DexFile const* dex_file_;
+  const DexFile* dex_file_;
   DexCache* dex_cache_;
-  DexFile::CodeItem const* code_item_;
+  const DexFile::CodeItem* code_item_;
 
   OatCompilationUnit* oat_compilation_unit_;
 
diff --git a/src/compiler_llvm/runtime_support_llvm.cc b/src/compiler_llvm/runtime_support_llvm.cc
index fce4a38..4566995 100644
--- a/src/compiler_llvm/runtime_support_llvm.cc
+++ b/src/compiler_llvm/runtime_support_llvm.cc
@@ -610,7 +610,7 @@
 COMPILER_RUNTIME_FUNC_LIST_NATIVE(EXTERNAL_LINKAGE)
 #undef EXTERNAL_LINKAGE
 
-static void* art_find_compiler_runtime_func(char const* name) {
+static void* art_find_compiler_runtime_func(const char* name) {
 // TODO: If target support some math func, use the target's version. (e.g. art_d2i -> __aeabi_d2iz)
   static const char* const names[] = {
 #define DEFINE_ENTRY(NAME) #NAME ,
@@ -786,9 +786,9 @@
   va_end(ap);
 }
 
-void* art_find_runtime_support_func(void* context, char const* name) {
+void* art_find_runtime_support_func(void* context, const char* name) {
   struct func_entry_t {
-    char const* name;
+    const char* name;
     size_t name_len;
     void* addr;
   };
diff --git a/src/compiler_llvm/runtime_support_llvm.h b/src/compiler_llvm/runtime_support_llvm.h
index dabd88f..c900717 100644
--- a/src/compiler_llvm/runtime_support_llvm.h
+++ b/src/compiler_llvm/runtime_support_llvm.h
@@ -61,7 +61,7 @@
 // Runtime Support Function Lookup Callback
 //----------------------------------------------------------------------------
 
-void* art_find_runtime_support_func(void* context, char const* name);
+void* art_find_runtime_support_func(void* context, const char* name);
 
 }  // namespace art
 
diff --git a/src/compiler_llvm/stub_compiler.cc b/src/compiler_llvm/stub_compiler.cc
index 7539532..d14dd62 100644
--- a/src/compiler_llvm/stub_compiler.cc
+++ b/src/compiler_llvm/stub_compiler.cc
@@ -47,7 +47,7 @@
 
 
 CompiledInvokeStub* StubCompiler::CreateInvokeStub(bool is_static,
-                                                   char const* shorty) {
+                                                   const char* shorty) {
   CHECK(shorty != NULL);
   size_t shorty_size = strlen(shorty);
 
@@ -174,7 +174,7 @@
 }
 
 
-CompiledInvokeStub* StubCompiler::CreateProxyStub(char const* shorty) {
+CompiledInvokeStub* StubCompiler::CreateProxyStub(const char* shorty) {
   CHECK(shorty != NULL);
   size_t shorty_size = strlen(shorty);
 
diff --git a/src/compiler_llvm/stub_compiler.h b/src/compiler_llvm/stub_compiler.h
index 0ed6261..9139acc 100644
--- a/src/compiler_llvm/stub_compiler.h
+++ b/src/compiler_llvm/stub_compiler.h
@@ -41,12 +41,12 @@
  public:
   StubCompiler(CompilationUnit* cunit, Compiler& compiler);
 
-  CompiledInvokeStub* CreateInvokeStub(bool is_static, char const* shorty);
-  CompiledInvokeStub* CreateProxyStub(char const* shorty);
+  CompiledInvokeStub* CreateInvokeStub(bool is_static, const char* shorty);
+  CompiledInvokeStub* CreateProxyStub(const char* shorty);
 
  private:
   CompilationUnit* cunit_;
-  Compiler const* compiler_;
+  const Compiler* compiler_;
   llvm::Module* module_;
   llvm::LLVMContext* context_;
   IRBuilder& irb_;
diff --git a/src/mark_stack.h b/src/mark_stack.h
index 7d4114e..59e12d0 100644
--- a/src/mark_stack.h
+++ b/src/mark_stack.h
@@ -67,7 +67,7 @@
   const Object* const* limit_;
 
   // Pointer to the top of the mark stack.
-  Object const**  ptr_;
+  const Object**  ptr_;
 
   DISALLOW_COPY_AND_ASSIGN(MarkStack);
 };