Implement GetCodeSize for LLVM build.
Change-Id: I8e271eb809c81615cc4605564cda5dc55251ea01
diff --git a/src/oat_file.cc b/src/oat_file.cc
index 81aa013..261fd60 100644
--- a/src/oat_file.cc
+++ b/src/oat_file.cc
@@ -397,8 +397,13 @@
code &= ~0x1;
return reinterpret_cast<uint32_t*>(code)[-1];
} else {
+#if !defined(ART_USE_LLVM_COMPILER)
UNIMPLEMENTED(ERROR);
return 0;
+#else
+ CHECK(elf_loader_ != NULL);
+ return elf_loader_->GetCodeSize(code_elf_idx_, code_elf_func_idx_);
+#endif
}
}
@@ -428,8 +433,14 @@
}
return reinterpret_cast<uint32_t*>(code)[-1];
} else {
+#if !defined(ART_USE_LLVM_COMPILER)
UNIMPLEMENTED(WARNING);
return 0;
+#else
+ CHECK(elf_loader_ != NULL);
+ return elf_loader_->GetCodeSize(invoke_stub_elf_idx_,
+ invoke_stub_elf_func_idx_);
+#endif
}
}