OSDN Git Service

libgo: Update to weekly.2011-12-14.
[pf3gnuchains/gcc-fork.git] / gcc / go / gofrontend / export.h
index 90c2465..a06b549 100644 (file)
@@ -7,6 +7,8 @@
 #ifndef GO_EXPORT_H
 #define GO_EXPORT_H
 
+#include "string-dump.h"
+
 struct sha1_ctx;
 class Gogo;
 class Import_init;
@@ -33,12 +35,11 @@ enum Builtin_code
   BUILTIN_INT = -11,
   BUILTIN_UINT = -12,
   BUILTIN_UINTPTR = -13,
-  BUILTIN_FLOAT = -14,
   BUILTIN_BOOL = -15,
   BUILTIN_STRING = -16,
   BUILTIN_COMPLEX64 = -17,
   BUILTIN_COMPLEX128 = -18,
-  BUILTIN_COMPLEX = -19,
+  BUILTIN_ERROR = -19,
 
   SMALLEST_BUILTIN_CODE = -19
 };
@@ -47,7 +48,7 @@ enum Builtin_code
 // loop of exporting.  A pointer to this class is also passed to the
 // various specific export implementations.
 
-class Export
+class Export : public String_dump
 {
  public:
   // The Stream class is an interface used to output the exported
@@ -59,12 +60,12 @@ class Export
     Stream();
     virtual ~Stream();
 
-    // Write a string.
+    // Write a string. Implements the String_dump interface.
     void
     write_string(const std::string& s)
     { this->write_and_sum_bytes(s.data(), s.length()); }
 
-    // Write a nul terminated string.
+    // Write a nul terminated string. Implements the String_dump interface.
     void
     write_c_string(const char* s)
     { this->write_and_sum_bytes(s, strlen(s)); }
@@ -181,11 +182,6 @@ class Stream_to_section : public Export::Stream
  protected:
   void
   do_write(const char*, size_t);
-
- private:
-  // The section we are writing to; this is really union section
-  // defined in output.h.
-  void* section_;
 };
 
 #endif // !defined(GO_EXPORT_H)