From 82d25e4e5e2904a11d67a6b302bf9bbc9382319a Mon Sep 17 00:00:00 2001 From: Mike Stump Date: Wed, 28 Oct 2009 01:51:46 +0000 Subject: [PATCH] Add mangling for VTTs. llvm-svn: 85363 --- clang/lib/CodeGen/Mangle.cpp | 7 +++++++ clang/lib/CodeGen/Mangle.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/clang/lib/CodeGen/Mangle.cpp b/clang/lib/CodeGen/Mangle.cpp index 2e6034bbcd97..b0015956be2d 100644 --- a/clang/lib/CodeGen/Mangle.cpp +++ b/clang/lib/CodeGen/Mangle.cpp @@ -52,6 +52,7 @@ namespace { void mangleGuardVariable(const VarDecl *D); void mangleCXXVtable(const CXXRecordDecl *RD); + void mangleCXXVTT(const CXXRecordDecl *RD); void mangleCXXRtti(const CXXRecordDecl *RD); void mangleCXXCtor(const CXXConstructorDecl *D, CXXCtorType Type); void mangleCXXDtor(const CXXDestructorDecl *D, CXXDtorType Type); @@ -204,6 +205,12 @@ void CXXNameMangler::mangleCXXVtable(const CXXRecordDecl *RD) { mangleName(RD); } +void CXXNameMangler::mangleCXXVTT(const CXXRecordDecl *RD) { + // ::= TT # VTT structure + Out << "_ZTT"; + mangleName(RD); +} + void CXXNameMangler::mangleCXXRtti(const CXXRecordDecl *RD) { // ::= TI # typeinfo structure Out << "_ZTI"; diff --git a/clang/lib/CodeGen/Mangle.h b/clang/lib/CodeGen/Mangle.h index 2cdb4e23919d..6ddec589afe0 100644 --- a/clang/lib/CodeGen/Mangle.h +++ b/clang/lib/CodeGen/Mangle.h @@ -65,6 +65,8 @@ namespace clang { llvm::raw_ostream &os); void mangleCXXVtable(MangleContext &Context, const CXXRecordDecl *RD, llvm::raw_ostream &os); + void mangleCXXVTT(MangleContext &Context, const CXXRecordDecl *RD, + llvm::raw_ostream &os); void mangleCXXRtti(MangleContext &Context, const CXXRecordDecl *RD, llvm::raw_ostream &os); void mangleCXXCtor(MangleContext &Context, const CXXConstructorDecl *D,