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 | ef15744092722f73280b04b4a3870b9d6f2cb01a (patch) | |
| tree | c97fd869fd4ddfd29b8f360f71e6567d3fc0bf20 | |
| parent | 42cc1806d863d42ed4d58d28e52ea99971bce07b (diff) | |
| download | bcm5719-llvm-ef15744092722f73280b04b4a3870b9d6f2cb01a.tar.gz bcm5719-llvm-ef15744092722f73280b04b4a3870b9d6f2cb01a.zip | |
Add mangling for the construction vtable.
llvm-svn: 86643
| -rw-r--r-- | clang/lib/CodeGen/Mangle.cpp | 22 | ||||
| -rw-r--r-- | clang/lib/CodeGen/Mangle.h | 3 |
2 files changed, 25 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/Mangle.cpp b/clang/lib/CodeGen/Mangle.cpp index 94abcbe3907..143b36676a0 100644 --- a/clang/lib/CodeGen/Mangle.cpp +++ b/clang/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); diff --git a/clang/lib/CodeGen/Mangle.h b/clang/lib/CodeGen/Mangle.h index 7f46a106f32..df50afa6e93 100644 --- a/clang/lib/CodeGen/Mangle.h +++ b/clang/lib/CodeGen/Mangle.h @@ -67,6 +67,9 @@ namespace clang { 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, |

