aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/Mangle.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-06-02 05:07:26 +0000
committerAnders Carlsson <andersca@mac.com>2010-06-02 05:07:26 +0000
commitdfc0d1ff1af5b199945a1ff98a6f7db0fdfb1615 (patch)
tree9c1f928b6374562dac6cf7b79dd2d43dcc0b782a /lib/CodeGen/Mangle.cpp
parent93296683a70eed2fae0b694748ed4cc51c53aef4 (diff)
Correctly mangle unsigned integer literals where the high bit is set.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105312 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/Mangle.cpp')
-rw-r--r--lib/CodeGen/Mangle.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp
index fa42b638e0..b7d8e2704a 100644
--- a/lib/CodeGen/Mangle.cpp
+++ b/lib/CodeGen/Mangle.cpp
@@ -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';