ART: PassMEDataHolder should have a data field
For passes that would like to pass data around while working, let them actually
allocate it if need be in the Start, use it during the Worker, and
potentially free it during the End.
Change-Id: I03238ef17158f7e2615d6defe5d7f15432c8a511
Signed-off-by: Jean Christophe Beyler <jean.christophe.beyler@intel.com>
diff --git a/compiler/dex/bb_optimizations.cc b/compiler/dex/bb_optimizations.cc
index 06e259a..920cde2 100644
--- a/compiler/dex/bb_optimizations.cc
+++ b/compiler/dex/bb_optimizations.cc
@@ -54,9 +54,9 @@
/*
* BasicBlock Optimization pass implementation start.
*/
-void BBOptimizations::Start(const PassDataHolder* data) const {
+void BBOptimizations::Start(PassDataHolder* data) const {
DCHECK(data != nullptr);
- CompilationUnit* c_unit = down_cast<const PassMEDataHolder*>(data)->c_unit;
+ CompilationUnit* c_unit = down_cast<PassMEDataHolder*>(data)->c_unit;
DCHECK(c_unit != nullptr);
/*
* This pass has a different ordering depEnding on the suppress exception,