summaryrefslogtreecommitdiffstats
path: root/clang/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
commit09277542f20cb42244cebf5d8af024f5ac41090c (patch)
tree2231ca001f62af16dade25a54a0515bed494021f /clang/lib/CodeGen/Mangle.cpp
parent67dd3a4464254a597683cdeac06c8bb8173dd110 (diff)
downloadbcm5719-llvm-09277542f20cb42244cebf5d8af024f5ac41090c.tar.gz
bcm5719-llvm-09277542f20cb42244cebf5d8af024f5ac41090c.zip
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. llvm-svn: 100905
Diffstat (limited to 'clang/lib/CodeGen/Mangle.cpp')
-rw-r--r--clang/lib/CodeGen/Mangle.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/Mangle.cpp b/clang/lib/CodeGen/Mangle.cpp
index a29841d02b7..649e848c996 100644
--- a/clang/lib/CodeGen/Mangle.cpp
+++ b/clang/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()));
OpenPOWER on IntegriCloud