aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/Mangle.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-03-01 19:12:25 +0000
committerJohn McCall <rjmccall@apple.com>2010-03-01 19:12:25 +0000
commite1e342f4a96f132d8d7e802284417bd520f9f4f8 (patch)
tree7cdb7da26564e996df3424a070b83cbcfc6cfcc6 /lib/CodeGen/Mangle.cpp
parent449d0a829007ea654912098e6a73134a2c529d61 (diff)
The latest draft uses 'dt' to mangle member expressions, and now so do we.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97479 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/Mangle.cpp')
-rw-r--r--lib/CodeGen/Mangle.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp
index fd9a1bab7f..d9a7991f78 100644
--- a/lib/CodeGen/Mangle.cpp
+++ b/lib/CodeGen/Mangle.cpp
@@ -1163,20 +1163,14 @@ void CXXNameMangler::mangleCalledExpression(const Expr *E, unsigned Arity) {
/// Mangles a member expression. Implicit accesses are not handled,
/// but that should be okay, because you shouldn't be able to
/// make an implicit access in a function template declaration.
-///
-/// The standard ABI does not describe how member expressions should
-/// be mangled, so this is very unstandardized. We mangle as if it
-/// were a binary operator, except that the RHS is mangled as an
-/// abstract name.
-///
-/// The standard ABI also does not assign a mangling to the dot
-/// operator, so we arbitrarily select 'me'.
void CXXNameMangler::mangleMemberExpr(const Expr *Base,
bool IsArrow,
NestedNameSpecifier *Qualifier,
DeclarationName Member,
unsigned Arity) {
- Out << (IsArrow ? "pt" : "me");
+ // gcc-4.4 uses 'dt' for dot expressions, which is reasonable.
+ // OTOH, gcc also mangles the name as an expression.
+ Out << (IsArrow ? "pt" : "dt");
mangleExpression(Base);
mangleUnresolvedName(Qualifier, Member, Arity);
}