First Last Prev Next    No search results available
Details
: [llvmg++] Methods and functions in anonymous namespaces d...
Bug#: 85
: tools
: llvm-g++
Status: RESOLVED
Resolution: FIXED
: PC
: Linux
: 1.0
: P2
: minor
: 1.1

:
: quality-of-implementation
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Chris Lattner <sabre@nondot.org>
Assigned To: Chris Lattner <sabre@nondot.org>

Attachments


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2003-11-03 15:53
The C++ front-end is horribly mangling the names of functions and methods in
anonymous namespaces, but it doesn't actually get around to marking them
internal.  This prevents the optimizer from doing lots of neat things, and
_explodes_ the size of some symbols.

This is a "feature" of the G++ side of things.  ugh.

-Chris
------- Comment #1 From Chris Lattner 2003-11-09 16:32:27 -------
I'm escalating this, because it prevents the LLVM optimizer from doing
significant things at compile time.
------- Comment #2 From Chris Lattner 2003-11-21 19:12:58 -------
This is finally fixed.  The patch is monsterous and noone cares, so I'm not
including it.

-Chris
------- Comment #3 From Chris Lattner 2003-12-06 14:47:07 -------
I applied this patch as well to reduce the size of identifiers in anonymous
namespaces:

$ diff -u decl.c~ decl.c
--- decl.c~     2003-08-27 16:55:52.000000000 -0500
+++ decl.c      2003-12-06 14:40:07.000000000 -0600
@@ -2053,7 +2086,12 @@
       /* The name of anonymous namespace is unique for the translation
          unit.  */
       if (!anonymous_namespace_name)
+       if (!EMIT_LLVM) {
         anonymous_namespace_name = get_file_function_name ('N');
+       } else {
+        anonymous_namespace_name = get_identifier ("_GLOBAL__N_");
+       }
+        
       name = anonymous_namespace_name;
       d = IDENTIFIER_NAMESPACE_VALUE (name);
       if (d)

First Last Prev Next    No search results available