diff options
author | Mike Stump <mrs@apple.com> | 2009-11-10 01:41:59 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-11-10 01:41:59 +0000 |
commit | ab3f7e9f5b81832da2b3633b3c0fcffff2907d40 (patch) | |
tree | 89cb71cd81908c2a64d23d69cfff0c2b1999e658 /lib/CodeGen/Mangle.cpp | |
parent | 3958b502404b4bd67f26fee398cb347abe89e6a8 (diff) |
Add mangling for the construction vtable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86643 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/Mangle.cpp')
-rw-r--r-- | lib/CodeGen/Mangle.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp index 94abcbe390..143b36676a 100644 --- a/lib/CodeGen/Mangle.cpp +++ b/lib/CodeGen/Mangle.cpp @@ -53,6 +53,8 @@ namespace { 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 @@ void CXXNameMangler::mangleCXXVTT(const CXXRecordDecl *RD) { 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 @@ namespace clang { 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); |