aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/Mangle.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-04-09 21:48:08 +0000
committerJohn McCall <rjmccall@apple.com>2010-04-09 21:48:08 +0000
commitde81063acdc999fbe1225f466ead12f7e9107acf (patch)
tree5eef86c3ffdfa3fd673f89d1d2fdf609332a670b /lib/CodeGen/Mangle.cpp
parent78713d86faeaaabb8aeb1683353e791defd3a3bf (diff)
Provide manglings for bool and character literal expressions. These are
just integer-literal expressions with special case implementations in the AST. Fixes rdar://problem/7825453. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100905 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/Mangle.cpp')
-rw-r--r--lib/CodeGen/Mangle.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp
index a29841d02b..649e848c99 100644
--- a/lib/CodeGen/Mangle.cpp
+++ b/lib/CodeGen/Mangle.cpp
@@ -1488,6 +1488,19 @@ void CXXNameMangler::mangleExpression(const Expr *E) {
break;
}
+ case Expr::CharacterLiteralClass:
+ Out << "L";
+ mangleType(E->getType());
+ Out << cast<CharacterLiteral>(E)->getValue();
+ Out << 'E';
+ break;
+
+ case Expr::CXXBoolLiteralExprClass:
+ Out << "Lb";
+ Out << (cast<CXXBoolLiteralExpr>(E)->getValue() ? '1' : '0');
+ Out << 'E';
+ break;
+
case Expr::IntegerLiteralClass:
mangleIntegerLiteral(E->getType(),
llvm::APSInt(cast<IntegerLiteral>(E)->getValue()));