summaryrefslogtreecommitdiffstats
path: root/runtime/oat_file.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/oat_file.h')
-rw-r--r--runtime/oat_file.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/runtime/oat_file.h b/runtime/oat_file.h
index eae0418c17..70253af614 100644
--- a/runtime/oat_file.h
+++ b/runtime/oat_file.h
@@ -60,6 +60,12 @@ class OatFile {
~OatFile();
+ ElfFile* GetElfFile() const {
+ CHECK_NE(reinterpret_cast<uintptr_t>(elf_file_.get()), reinterpret_cast<uintptr_t>(nullptr))
+ << "Cannot get an elf file from " << GetLocation();
+ return elf_file_.get();
+ }
+
const std::string& GetLocation() const {
return location_;
}
@@ -227,6 +233,9 @@ class OatFile {
return End() - Begin();
}
+ const byte* Begin() const;
+ const byte* End() const;
+
private:
static void CheckLocation(const std::string& location);
@@ -248,9 +257,6 @@ class OatFile {
std::string* error_msg);
bool Setup(std::string* error_msg);
- const byte* Begin() const;
- const byte* End() const;
-
// The oat file name.
//
// The image will embed this to link its associated oat file.