[cfe-commits] r92911 - in /cfe/trunk: lib/CodeGen/Mangle.cpp test/CodeGenCXX/mangle.cpp
Chris Lattner
clattner at apple.com
Thu Jan 7 09:43:29 PST 2010
On Jan 7, 2010, at 1:36 AM, Nuno Lopes wrote:
> Author: nlopes
> Date: Thu Jan 7 03:36:51 2010
> New Revision: 92911
>
> URL: http://llvm.org/viewvc/llvm-project?rev=92911&view=rev
> Log:
> fix PR5869: mangle static symbols like gcc does to make it easier to
> diff symbol tables
Cool, does this happen to fix http://llvm.org/bugs/show_bug.cgi?
id=5966 also?
-Chris
>
> Modified:
> cfe/trunk/lib/CodeGen/Mangle.cpp
> cfe/trunk/test/CodeGenCXX/mangle.cpp
>
> Modified: cfe/trunk/lib/CodeGen/Mangle.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Mangle.cpp?rev=92911&r1=92910&r2=92911&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/CodeGen/Mangle.cpp (original)
> +++ cfe/trunk/lib/CodeGen/Mangle.cpp Thu Jan 7 03:36:51 2010
> @@ -199,10 +199,13 @@
> return;
> }
>
> - // <mangled-name> ::= _Z <encoding>
> + // <mangled-name> ::= _Z [L] <encoding>
> // ::= <data name>
> // ::= <special-name>
> Out << Prefix;
> + if (D->getLinkage() == NamedDecl::InternalLinkage) // match gcc
> behavior
> + Out << 'L';
> +
> if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D))
> mangleFunctionEncoding(FD);
> else
>
> Modified: cfe/trunk/test/CodeGenCXX/mangle.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/mangle.cpp?rev=92911&r1=92910&r2=92911&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/test/CodeGenCXX/mangle.cpp (original)
> +++ cfe/trunk/test/CodeGenCXX/mangle.cpp Thu Jan 7 03:36:51 2010
> @@ -308,4 +308,9 @@
> }
>
> // CHECK: define void @_Z1fU13block_pointerFiiiE
> -void f(int (^)(int, int)) { }
> \ No newline at end of file
> +void f(int (^)(int, int)) { }
> +
> +// PR5869
> +// CHECK: define internal void @_ZL2f2v
> +static void f2() {}
> +void f3() { f2(); }
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list