Compile speed improvement.
authorMatt Austern <austern@apple.com>
Wed, 1 Dec 2004 19:44:48 +0000 (19:44 +0000)
committerMatt Austern <austern@gcc.gnu.org>
Wed, 1 Dec 2004 19:44:48 +0000 (19:44 +0000)
* name-lookup.c (namespace_binding): Omit alias check for global namespace.

From-SVN: r91575

gcc/cp/ChangeLog
gcc/cp/name-lookup.c

index 8b267c3031baf9ee499be8b3e76243acf1535f92..eff52c90e813b2eaa9cdc6c70ef6da54aa5542c5 100644 (file)
@@ -1,3 +1,7 @@
+2004-12-01  Matt Austern  <austern@apple.com>
+
+       * name-lookup.c (namespace_binding): Omit alias check for global namespace.
+
 2004-12-01  Nathan Sidwell  <nathan@codesourcery.com>
 
        PR c++/18729
index ee0d1a45e7ce33b0c2911e1c4ccfe90cb63d1ef1..6d5d00deb15b13351d518fb5d9eff77afb94a148 100644 (file)
@@ -2735,7 +2735,10 @@ namespace_binding (tree name, tree scope)
 
   if (scope == NULL)
     scope = global_namespace;
-  scope = ORIGINAL_NAMESPACE (scope);
+  else
+    /* Unnecessary for the global namespace because it can't be an alias. */
+    scope = ORIGINAL_NAMESPACE (scope);
+
   binding = cxx_scope_find_binding_for_name (NAMESPACE_LEVEL (scope), name);
 
   return binding ? binding->value : NULL_TREE;