[cfe-commits] r105312 - in /cfe/trunk: lib/CodeGen/Mangle.cpp test/CodeGenCXX/mangle.cpp
Anders Carlsson
andersca at mac.com
Tue Jun 1 22:07:26 PDT 2010
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());
}
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
More information about the cfe-commits
mailing list