summaryrefslogtreecommitdiff
path: root/src/compiler_llvm/compiler_llvm.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler_llvm/compiler_llvm.cc')
-rw-r--r--src/compiler_llvm/compiler_llvm.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/compiler_llvm/compiler_llvm.cc b/src/compiler_llvm/compiler_llvm.cc
index 65d53b96e6..e02c9135b9 100644
--- a/src/compiler_llvm/compiler_llvm.cc
+++ b/src/compiler_llvm/compiler_llvm.cc
@@ -225,6 +225,17 @@ GetMethodInvokeStubAddr(const CompiledInvokeStub* cm, const Method* method) cons
}
+std::vector<ElfImage> CompilerLLVM::GetElfImages() const {
+ std::vector<ElfImage> result;
+
+ for (size_t i = 0; i < cunits_.size(); ++i) {
+ result.push_back(cunits_[i]->GetElfImage());
+ }
+
+ return result;
+}
+
+
CompiledMethod* CompilerLLVM::
CompileDexMethod(OatCompilationUnit* oat_compilation_unit) {
MutexLock GUARD(compiler_lock_);
@@ -362,6 +373,10 @@ extern "C" const art::Method::InvokeStub* compilerLLVMGetMethodInvokeStubAddr(co
return compiler_llvm->GetMethodInvokeStubAddr(cm, method);
}
+extern "C" std::vector<art::ElfImage> compilerLLVMGetElfImages(const art::Compiler& compiler) {
+ return ContextOf(compiler)->GetElfImages();
+}
+
// Note: Using this function carefully!!! This is temporary solution, we will remove it.
extern "C" art::MutexLock* compilerLLVMMutexLock(art::Compiler& compiler) {
return new art::MutexLock(ContextOf(compiler)->compiler_lock_);