aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/Mangle.cpp
diff options
context:
space:
mode:
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';