escape: Add escape notes to export data.

Change-Id: Ibc54db9b703d543ea784edc97b03be1eb0038584
Reviewed-on: https://go-review.googlesource.com/22375
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/go/export.cc b/go/export.cc
index 5c0094d..e07246e 100644
--- a/go/export.cc
+++ b/go/export.cc
@@ -436,6 +436,21 @@
     this->type_refs_[type] = index;
 }
 
+// Export escape note.
+
+void
+Export::write_escape(std::string* note)
+{
+  if (note != NULL && *note != "esc:0x0")
+    {
+      this->write_c_string(" ");
+      char buf[50];
+      go_assert(note->find("esc:") != std::string::npos);
+      snprintf(buf, sizeof buf, "<%s>", note->c_str());
+      this->write_c_string(buf);
+    }
+}
+
 // Add the builtin types to the export table.
 
 void