summaryrefslogtreecommitdiff
path: root/src/compiler_llvm/jni_compiler.cc
diff options
context:
space:
mode:
author Shih-wei Liao <sliao@google.com> 2012-04-07 10:31:39 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2012-04-07 10:31:40 -0700
commitb12c3017e619747ab26ba56d935401a7e45b59cd (patch)
treebc45ed835422af1d77292de229916fb2cf65d34f /src/compiler_llvm/jni_compiler.cc
parent3f859a44f5e445122174b4645a721b5d2f913950 (diff)
parent937105a220983351695bf4c8924171ba5d17a68c (diff)
Merge "Use ELF function index to distinguish generated functions." into ics-mr1-plus-art
Diffstat (limited to 'src/compiler_llvm/jni_compiler.cc')
-rw-r--r--src/compiler_llvm/jni_compiler.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/compiler_llvm/jni_compiler.cc b/src/compiler_llvm/jni_compiler.cc
index 097c4f11d0..285caaba26 100644
--- a/src/compiler_llvm/jni_compiler.cc
+++ b/src/compiler_llvm/jni_compiler.cc
@@ -52,7 +52,8 @@ JniCompiler::JniCompiler(CompilationUnit* cunit,
class_loader_(oat_compilation_unit->class_loader_),
dex_cache_(oat_compilation_unit->dex_cache_),
dex_file_(oat_compilation_unit->dex_file_),
- method_(dex_cache_->GetResolvedMethod(method_idx_)) {
+ method_(dex_cache_->GetResolvedMethod(method_idx_)),
+ elf_func_idx_(cunit_->AcquireUniqueElfFuncIndex()) {
// Check: Ensure that the method is resolved
CHECK_NE(method_, static_cast<art::Method*>(NULL));
@@ -289,13 +290,14 @@ CompiledMethod* JniCompiler::Compile() {
llvm::verifyFunction(*func_, llvm::PrintMessageAction);
return new CompiledMethod(cunit_->GetInstructionSet(),
- cunit_->GetElfIndex());
+ cunit_->GetElfIndex(),
+ elf_func_idx_);
}
void JniCompiler::CreateFunction() {
// LLVM function name
- std::string func_name(LLVMLongName(method_));
+ std::string func_name(ElfFuncName(elf_func_idx_));
// Get function type
llvm::FunctionType* func_type =