Sync libiberty with upstream GCC.
[binutils-gdb.git] / gold / stringpool.h
index 2f9a3139358540ba517ba607b2698f321ad732a0..8ef8386b59b9220016b3f798b8600d0f87a8d7c5 100644 (file)
@@ -1,6 +1,6 @@
 // stringpool.h -- a string pool for gold    -*- C++ -*-
 
-// Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
+// Copyright (C) 2006-2014 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -180,7 +180,7 @@ class Stringpool_template
   typedef size_t Key;
 
   // Create a Stringpool.
-  Stringpool_template();
+  Stringpool_template(uint64_t addralign = 1);
 
   ~Stringpool_template();
 
@@ -219,6 +219,11 @@ class Stringpool_template
   const Stringpool_char*
   add(const Stringpool_char* s, bool copy, Key* pkey);
 
+  // Add the string S to the pool.
+  const Stringpool_char*
+  add(const std::basic_string<Stringpool_char>& s, bool copy, Key* pkey)
+  { return this->add_with_length(s.data(), s.size(), copy, pkey); }
+
   // Add string S of length LEN characters to the pool.  If COPY is
   // true, S need not be null terminated.
   const Stringpool_char*
@@ -404,6 +409,8 @@ class Stringpool_template
   bool optimize_;
   // offset of the next string.
   section_offset_type offset_;
+  // The alignment of strings in the stringpool.
+  uint64_t addralign_;
 };
 
 // The most common type of Stringpool.