* i386.cc (class Target_i386): Add got_tlsdesc_ field.
[binutils-gdb.git] / gold / gold.h
index dc5a1c1b3521dc90e443ba9fde29dfdc07aee3ae..90f1f7d1f4ecfbf6ae53c5ef387b0d6e55223963 100644 (file)
@@ -1,6 +1,6 @@
 // gold.h -- general definitions for gold   -*- C++ -*-
 
-// Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -121,7 +121,7 @@ struct hash<T*>
 
 #define Unordered_set std::set
 #define Unordered_map std::map
-#define Unordered_map std::multimap
+#define Unordered_multimap std::multimap
 
 #define reserve_unordered_map(map, n)
 
@@ -349,6 +349,21 @@ is_prefix_of(const char* prefix, const char* str)
   return strncmp(prefix, str, strlen(prefix)) == 0;
 }
 
+const char* const cident_section_start_prefix = "__start_";
+const char* const cident_section_stop_prefix = "__stop_";
+
+// Returns true if the name is a valid C identifier
+inline bool
+is_cident(const char* name)
+{
+  return (name[strspn(name,
+                     ("0123456789"
+                      "ABCDEFGHIJKLMNOPWRSTUVWXYZ"
+                      "abcdefghijklmnopqrstuvwxyz"
+                      "_"))]
+         == '\0');
+}
+
 // We sometimes need to hash strings.  Ideally we should use std::tr1::hash or
 // __gnu_cxx::hash on some systems but there is no guarantee that either
 // one is available.  For portability, we define simple string hash functions.
@@ -386,6 +401,15 @@ string_hash(const Char_type* s)
   return h;
 }
 
+// Return whether STRING contains a wildcard character.  This is used
+// to speed up matching.
+
+inline bool
+is_wildcard_string(const char* s)
+{
+  return strpbrk(s, "?*[") != NULL;
+}
+
 } // End namespace gold.
 
 #endif // !defined(GOLD_GOLD_H)