summaryrefslogtreecommitdiff
path: root/dexlayout/dex_ir_builder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'dexlayout/dex_ir_builder.cc')
-rw-r--r--dexlayout/dex_ir_builder.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/dexlayout/dex_ir_builder.cc b/dexlayout/dex_ir_builder.cc
index 4f9bcdd742..9468f763d6 100644
--- a/dexlayout/dex_ir_builder.cc
+++ b/dexlayout/dex_ir_builder.cc
@@ -43,7 +43,13 @@ Header* DexIrBuilder(const DexFile& dex_file,
disk_header.link_off_,
disk_header.data_size_,
disk_header.data_off_,
- dex_file.SupportsDefaultMethods());
+ dex_file.SupportsDefaultMethods(),
+ dex_file.NumStringIds(),
+ dex_file.NumTypeIds(),
+ dex_file.NumProtoIds(),
+ dex_file.NumFieldIds(),
+ dex_file.NumMethodIds(),
+ dex_file.NumClassDefs());
Collections& collections = header->GetCollections();
collections.SetEagerlyAssignOffsets(eagerly_assign_offsets);
// Walk the rest of the header fields.
@@ -94,6 +100,7 @@ Header* DexIrBuilder(const DexFile& dex_file,
// Sort the vectors by the map order (same order as the file).
collections.SortVectorsByMapOrder();
+ collections.ClearMaps();
// Load the link data if it exists.
collections.SetLinkData(std::vector<uint8_t>(