Added new -v option to dexlayout to verify output dex file.

Passing -v will cause dexlayout to do an IR level comparison of the
output with the original input dex file. This checks that the data in
the dex files are the same, but allows for different offsets since the
output dex file may have a different layout.

Test: mm test-art-host
Bug: 36107940
Change-Id: If75a93973ffdd2d91111727f089713c800d8cee8
diff --git a/dexlayout/dexlayout.h b/dexlayout/dexlayout.h
index 74b5253..f26b423 100644
--- a/dexlayout/dexlayout.h
+++ b/dexlayout/dexlayout.h
@@ -58,6 +58,7 @@
   bool show_section_headers_ = false;
   bool show_section_statistics_ = false;
   bool verbose_ = false;
+  bool verify_output_ = false;
   bool visualize_pattern_ = false;
   OutputFormat output_format_ = kOutputPlain;
   const char* output_dex_directory_ = nullptr;
@@ -115,7 +116,7 @@
   // Creates a new layout for the dex file based on profile info.
   // Currently reorders ClassDefs, ClassDataItems, and CodeItems.
   void LayoutOutputFile(const DexFile* dex_file);
-  void OutputDexFile(const std::string& dex_file_location);
+  void OutputDexFile(const DexFile* dex_file);
 
   void DumpCFG(const DexFile* dex_file, int idx);
   void DumpCFG(const DexFile* dex_file, uint32_t dex_method_idx, const DexFile::CodeItem* code);