summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/Mangle.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-06-26 16:09:40 +0000
committerAnders Carlsson <andersca@mac.com>2010-06-26 16:09:40 +0000
commit709ef8e46c0b481925d02d76691b07264a8c8a06 (patch)
treecae5b68c633c8cb2beaaa9dbd3b92c2363dc56c2 /clang/lib/CodeGen/Mangle.cpp
parent3a5cb69cb850ed6f67c3212d3859a29595b9a83a (diff)
downloadbcm5719-llvm-709ef8e46c0b481925d02d76691b07264a8c8a06.tar.gz
bcm5719-llvm-709ef8e46c0b481925d02d76691b07264a8c8a06.zip
Add function for mangling reference temporaries.
llvm-svn: 106948
Diffstat (limited to 'clang/lib/CodeGen/Mangle.cpp')
-rw-r--r--clang/lib/CodeGen/Mangle.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/Mangle.cpp b/clang/lib/CodeGen/Mangle.cpp
index 154153aaebf..ac962247fd0 100644
--- a/clang/lib/CodeGen/Mangle.cpp
+++ b/clang/lib/CodeGen/Mangle.cpp
@@ -2253,6 +2253,15 @@ void MangleContext::mangleGuardVariable(const VarDecl *D,
Mangler.mangleName(D);
}
+void MangleContext::mangleReferenceTemporary(const VarDecl *D,
+ llvm::SmallVectorImpl<char> &Res) {
+ // We match the GCC mangling here.
+ // <special-name> ::= GR <object name>
+ CXXNameMangler Mangler(*this, Res);
+ Mangler.getStream() << "_ZGR";
+ Mangler.mangleName(D);
+}
+
void MangleContext::mangleCXXVTable(const CXXRecordDecl *RD,
llvm::SmallVectorImpl<char> &Res) {
// <special-name> ::= TV <type> # virtual table
OpenPOWER on IntegriCloud