summaryrefslogtreecommitdiffstats
path: root/dexlayout
diff options
context:
space:
mode:
Diffstat (limited to 'dexlayout')
-rw-r--r--dexlayout/dex_ir.h3
-rw-r--r--dexlayout/dex_writer.cc8
-rw-r--r--dexlayout/dexlayout.cc3
3 files changed, 9 insertions, 5 deletions
diff --git a/dexlayout/dex_ir.h b/dexlayout/dex_ir.h
index 9c887b9a17..362c08b918 100644
--- a/dexlayout/dex_ir.h
+++ b/dexlayout/dex_ir.h
@@ -26,6 +26,7 @@
#include "base/stl_util.h"
#include "dex_file-inl.h"
+#include "dex_file_types.h"
#include "leb128.h"
#include "utf.h"
@@ -250,7 +251,7 @@ class Collections {
}
StringId* GetStringIdOrNullPtr(uint32_t index) {
- return index == DexFile::kDexNoIndex ? nullptr : GetStringId(index);
+ return index == dex::kDexNoIndex ? nullptr : GetStringId(index);
}
TypeId* GetTypeIdOrNullPtr(uint16_t index) {
return index == DexFile::kDexNoIndex16 ? nullptr : GetTypeId(index);
diff --git a/dexlayout/dex_writer.cc b/dexlayout/dex_writer.cc
index e1b828ca52..11ba2a6357 100644
--- a/dexlayout/dex_writer.cc
+++ b/dexlayout/dex_writer.cc
@@ -16,12 +16,14 @@
* Header file of an in-memory representation of DEX files.
*/
+#include "dex_writer.h"
+
#include <stdint.h>
#include <queue>
#include <vector>
-#include "dex_writer.h"
+#include "dex_file_types.h"
#include "utf.h"
namespace art {
@@ -462,10 +464,10 @@ void DexWriter::WriteClasses() {
for (std::unique_ptr<dex_ir::ClassDef>& class_def : header_->GetCollections().ClassDefs()) {
class_def_buffer[0] = class_def->ClassType()->GetIndex();
class_def_buffer[1] = class_def->GetAccessFlags();
- class_def_buffer[2] = class_def->Superclass() == nullptr ? DexFile::kDexNoIndex :
+ class_def_buffer[2] = class_def->Superclass() == nullptr ? dex::kDexNoIndex :
class_def->Superclass()->GetIndex();
class_def_buffer[3] = class_def->InterfacesOffset();
- class_def_buffer[4] = class_def->SourceFile() == nullptr ? DexFile::kDexNoIndex :
+ class_def_buffer[4] = class_def->SourceFile() == nullptr ? dex::kDexNoIndex :
class_def->SourceFile()->GetIndex();
class_def_buffer[5] = class_def->Annotations() == nullptr ? 0 :
class_def->Annotations()->GetOffset();
diff --git a/dexlayout/dexlayout.cc b/dexlayout/dexlayout.cc
index 401a3ee284..92a1366778 100644
--- a/dexlayout/dexlayout.cc
+++ b/dexlayout/dexlayout.cc
@@ -35,6 +35,7 @@
#include "dex_file-inl.h"
#include "dex_file_layout.h"
+#include "dex_file_types.h"
#include "dex_file_verifier.h"
#include "dex_instruction-inl.h"
#include "dex_ir_builder.h"
@@ -366,7 +367,7 @@ static std::unique_ptr<char[]> IndexString(dex_ir::Header* header,
std::unique_ptr<char[]> buf(new char[buf_size]);
// Determine index and width of the string.
uint32_t index = 0;
- uint32_t secondary_index = DexFile::kDexNoIndex;
+ uint32_t secondary_index = dex::kDexNoIndex;
uint32_t width = 4;
switch (Instruction::FormatOf(dec_insn->Opcode())) {
// SOME NOT SUPPORTED: