[cfe-commits] r105312 - in /cfe/trunk: lib/CodeGen/Mangle.cpp test/CodeGenCXX/mangle.cpp
Daniel Dunbar
daniel at zuster.org
Wed Jun 2 08:50:23 PDT 2010
Hi Anders,
On Tue, Jun 1, 2010 at 10:07 PM, Anders Carlsson <andersca at mac.com> wrote:
> Author: andersca
> Date: Wed Jun 2 00:07:26 2010
> New Revision: 105312
>
> URL: http://llvm.org/viewvc/llvm-project?rev=105312&view=rev
> Log:
> Correctly mangle unsigned integer literals where the high bit is set.
>
> 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=105312&r1=105311&r2=105312&view=diff
> ==============================================================================
> --- cfe/trunk/lib/CodeGen/Mangle.cpp (original)
> +++ cfe/trunk/lib/CodeGen/Mangle.cpp Wed Jun 2 00:07:26 2010
> @@ -1391,9 +1391,11 @@
> // Boolean values are encoded as 0/1.
> Out << (Value.getBoolValue() ? '1' : '0');
> } else {
> - if (Value.isNegative())
> + if (Value.isSigned() && Value.isNegative()) {
> Out << 'n';
> - Value.abs().print(Out, false);
> + Value.abs().print(Out, true);
> + } else
> + Value.print(Out, Value.isSigned());
Should this be
Value.print(Out, false);
?
- Daniel
> }
> Out << 'E';
>
>
> Modified: cfe/trunk/test/CodeGenCXX/mangle.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/mangle.cpp?rev=105312&r1=105311&r2=105312&view=diff
> ==============================================================================
> --- cfe/trunk/test/CodeGenCXX/mangle.cpp (original)
> +++ cfe/trunk/test/CodeGenCXX/mangle.cpp Wed Jun 2 00:07:26 2010
> @@ -489,3 +489,10 @@
> // CHECK: @_ZN6test111A1fEz
> void A::f(...) { }
> }
> +
> +namespace test12 {
> +
> + // CHECK: _ZN6test121fENS_1AILt33000EEE
> + template <unsigned short> struct A { };
> + void f(A<33000>) { }
> +}
> \ No newline at end of file
>
>
> _______________________________________________
> 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