summaryrefslogtreecommitdiffstats
path: root/clang/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
commitde9607bc6f79e021bc65250481dbca3d98eb2d47 (patch)
treea1d7a0cfd7889e762848bac934aee4e3e7f6ab96 /clang/lib/CodeGen/Mangle.cpp
parent79e31db9a99e8b1e8af740f5b689581c55bdbc9d (diff)
downloadbcm5719-llvm-de9607bc6f79e021bc65250481dbca3d98eb2d47.tar.gz
bcm5719-llvm-de9607bc6f79e021bc65250481dbca3d98eb2d47.zip
The latest draft uses 'dt' to mangle member expressions, and now so do we.
llvm-svn: 97479
Diffstat (limited to 'clang/lib/CodeGen/Mangle.cpp')
-rw-r--r--clang/lib/CodeGen/Mangle.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/clang/lib/CodeGen/Mangle.cpp b/clang/lib/CodeGen/Mangle.cpp
index fd9a1bab7f2..d9a7991f78b 100644
--- a/clang/lib/CodeGen/Mangle.cpp
+++ b/clang/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);
}
OpenPOWER on IntegriCloud