Index: runtime/vm/locations.cc |
diff --git a/runtime/vm/locations.cc b/runtime/vm/locations.cc |
index 41a3d79cb1eb7777eea06189fdcf92e42a4b9e2a..d9d044aa792335826a37dd7ca2c7e0dba1c8a94c 100644 |
--- a/runtime/vm/locations.cc |
+++ b/runtime/vm/locations.cc |
@@ -216,6 +216,14 @@ void Location::PrintTo(BufferFormatter* f) const { |
} |
+const char* Location::ToCString() const { |
+ char buffer[1024]; |
+ BufferFormatter bf(buffer, 1024); |
+ PrintTo(&bf); |
+ return Isolate::Current()->current_zone()->MakeCopyOfString(buffer); |
+} |
+ |
+ |
void Location::Print() const { |
if (kind() == kStackSlot) { |
OS::Print("S%+" Pd "", stack_index()); |