Improve error messages in art::GraphChecker and art::SSAChecker
- Add an art::GraphChecker::AddError helper.
- Use StringPrintf instead of std::stringstream.
- Rephrase some error messages.
Change-Id: Ia741e9e67cb5122f086a7383a2bc02d60ca637df
diff --git a/compiler/optimizing/graph_checker.h b/compiler/optimizing/graph_checker.h
index ae1557b..5ec3003 100644
--- a/compiler/optimizing/graph_checker.h
+++ b/compiler/optimizing/graph_checker.h
@@ -60,6 +60,11 @@
}
protected:
+ // Report a new error.
+ void AddError(const std::string& error) {
+ errors_.push_back(error);
+ }
+
ArenaAllocator* const allocator_;
// The block currently visited.
HBasicBlock* current_block_ = nullptr;