Correctly mangle unsigned integer literals where the high bit is set.
llvm-svn: 105312
This commit is contained in:
parent
728fe444f1
commit
d951a7ebf8
|
@ -1391,9 +1391,11 @@ void CXXNameMangler::mangleIntegerLiteral(QualType T,
|
|||
// 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';
|
||||
|
||||
|
|
|
@ -489,3 +489,10 @@ namespace test11 {
|
|||
// CHECK: @_ZN6test111A1fEz
|
||||
void A::f(...) { }
|
||||
}
|
||||
|
||||
namespace test12 {
|
||||
|
||||
// CHECK: _ZN6test121fENS_1AILt33000EEE
|
||||
template <unsigned short> struct A { };
|
||||
void f(A<33000>) { }
|
||||
}
|
Loading…
Reference in New Issue