summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/Mangle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/Mangle.cpp')
-rw-r--r--clang/lib/CodeGen/Mangle.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/Mangle.cpp b/clang/lib/CodeGen/Mangle.cpp
index fa42b638e07..b7d8e2704a4 100644
--- a/clang/lib/CodeGen/Mangle.cpp
+++ b/clang/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';
OpenPOWER on IntegriCloud