aboutsummaryrefslogtreecommitdiff
path: root/gold/stringpool.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2011-06-28 05:39:45 +0000
committerIan Lance Taylor <ian@airs.com>2011-06-28 05:39:45 +0000
commit6d1c4efb9c89fcaca4c24f0ef0535a706136d544 (patch)
tree0500c7bbf28bf9151513779d517f6cab15e2e0c7 /gold/stringpool.h
parent0f4e53222c59f75a57ffa474f21de70b7d27c16f (diff)
downloadgdb-6d1c4efb9c89fcaca4c24f0ef0535a706136d544.zip
gdb-6d1c4efb9c89fcaca4c24f0ef0535a706136d544.tar.gz
gdb-6d1c4efb9c89fcaca4c24f0ef0535a706136d544.tar.bz2
* symtab.cc (Symbol::versioned_name): New function.
(Symbol_table::add_to_final_symtab): Use versioned_name when appropriate. (Symbol_table::sized_write_symbol): Likewise. * symtab.h (class Symbol): Declare versioned_name. * stringpool.h (class Stringpool_template): Add variant of add which takes a std::basic_string. * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_12. (ver_test_12_SOURCES, ver_test_12_DEPENDENCIES): New variables. (ver_test_12_LDFLAGS, ver_test_12_LDADD): New variables. (ver_test_12.o): New target. * testsuite/Makefile.in: Rebuild.
Diffstat (limited to 'gold/stringpool.h')
-rw-r--r--gold/stringpool.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/gold/stringpool.h b/gold/stringpool.h
index 2f9a313..c51b143 100644
--- a/gold/stringpool.h
+++ b/gold/stringpool.h
@@ -1,6 +1,6 @@
// stringpool.h -- a string pool for gold -*- C++ -*-
-// Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
+// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
@@ -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*