ART: Do not use std::<container>::at().
These functions are specified as throwing std::out_of_range
and we do not use exceptions.
Test: m
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: I67c365ed6d779c101a18b9f386c751c48ca76e16
diff --git a/tools/veridex/flow_analysis.cc b/tools/veridex/flow_analysis.cc
index 154c60f..d4f7e5f 100644
--- a/tools/veridex/flow_analysis.cc
+++ b/tools/veridex/flow_analysis.cc
@@ -739,14 +739,15 @@
MethodReference method(&resolver_->GetDexFile(), id);
// TODO: doesn't work for multidex
// TODO: doesn't work for overriding (but maybe should be done at a higher level);
- if (accesses_.find(method) == accesses_.end()) {
+ auto method_accesses_it = accesses_.find(method);
+ if (method_accesses_it == accesses_.end()) {
return GetReturnType(id);
}
uint32_t args[5];
if (!is_range) {
instruction.GetVarArgs(args);
}
- for (const ReflectAccessInfo& info : accesses_.at(method)) {
+ for (const ReflectAccessInfo& info : method_accesses_it->second) {
if (info.cls.IsParameter() || info.name.IsParameter()) {
RegisterValue cls = info.cls.IsParameter()
? GetRegister(GetParameterAt(instruction, is_range, args, info.cls.GetParameterIndex()))