[cfe-commits] r86643 - in /cfe/trunk/lib/CodeGen: Mangle.cpp Mangle.h
Mike Stump
mrs at apple.com
Mon Nov 9 17:42:00 PST 2009
Author: mrs
Date: Mon Nov 9 19:41:59 2009
New Revision: 86643
URL: http://llvm.org/viewvc/llvm-project?rev=86643&view=rev
Log:
Add mangling for the construction vtable.
Modified:
cfe/trunk/lib/CodeGen/Mangle.cpp
cfe/trunk/lib/CodeGen/Mangle.h
Modified: cfe/trunk/lib/CodeGen/Mangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Mangle.cpp?rev=86643&r1=86642&r2=86643&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.cpp (original)
+++ cfe/trunk/lib/CodeGen/Mangle.cpp Mon Nov 9 19:41:59 2009
@@ -53,6 +53,8 @@
void mangleCXXVtable(const CXXRecordDecl *RD);
void mangleCXXVTT(const CXXRecordDecl *RD);
+ void mangleCXXCtorVtable(const CXXRecordDecl *RD, int64_t Offset,
+ const CXXRecordDecl *Type);
void mangleCXXRtti(QualType Ty);
void mangleCXXCtor(const CXXConstructorDecl *D, CXXCtorType Type);
void mangleCXXDtor(const CXXDestructorDecl *D, CXXDtorType Type);
@@ -216,6 +218,17 @@
mangleName(RD);
}
+void CXXNameMangler::mangleCXXCtorVtable(const CXXRecordDecl *RD,
+ int64_t Offset,
+ const CXXRecordDecl *Type) {
+ // <special-name> ::= TC <type> <offset number> _ <base type>
+ Out << "_ZTC";
+ mangleName(RD);
+ Out << Offset;
+ Out << "_";
+ mangleName(Type);
+}
+
void CXXNameMangler::mangleCXXRtti(QualType Ty) {
// <special-name> ::= TI <type> # typeinfo structure
Out << "_ZTI";
@@ -1443,6 +1456,15 @@
os.flush();
}
+ void mangleCXXCtorVtable(MangleContext &Context, const CXXRecordDecl *RD,
+ int64_t Offset, const CXXRecordDecl *Type,
+ llvm::raw_ostream &os) {
+ CXXNameMangler Mangler(Context, os);
+ Mangler.mangleCXXCtorVtable(RD, Offset, Type);
+
+ os.flush();
+ }
+
void mangleCXXRtti(MangleContext &Context, QualType Ty,
llvm::raw_ostream &os) {
CXXNameMangler Mangler(Context, os);
Modified: cfe/trunk/lib/CodeGen/Mangle.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Mangle.h?rev=86643&r1=86642&r2=86643&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.h (original)
+++ cfe/trunk/lib/CodeGen/Mangle.h Mon Nov 9 19:41:59 2009
@@ -67,6 +67,9 @@
llvm::raw_ostream &os);
void mangleCXXVTT(MangleContext &Context, const CXXRecordDecl *RD,
llvm::raw_ostream &os);
+ void mangleCXXCtorVtable(MangleContext &Context, const CXXRecordDecl *RD,
+ int64_t Offset, const CXXRecordDecl *Type,
+ llvm::raw_ostream &os);
void mangleCXXRtti(MangleContext &Context, QualType T,
llvm::raw_ostream &os);
void mangleCXXCtor(MangleContext &Context, const CXXConstructorDecl *D,
More information about the cfe-commits
mailing list