ART: Make some variables references

Avoid copying values.

Bug: 32619234
Test: m
Change-Id: I86bc206d6f6fccdf730c62c60317a7a4ae26c11b
diff --git a/runtime/gc/space/image_space.cc b/runtime/gc/space/image_space.cc
index 118daac..0b602e9 100644
--- a/runtime/gc/space/image_space.cc
+++ b/runtime/gc/space/image_space.cc
@@ -1606,7 +1606,7 @@
 
   std::ostringstream oss;
   bool first = true;
-  for (auto msg : error_msgs) {
+  for (const auto& msg : error_msgs) {
     if (!first) {
       oss << "\n    ";
     }