From 88e9171fc744190de283a3ec0a5c327cfc0ba3df 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85363 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/Mangle.cpp | 7 +++++++ lib/CodeGen/Mangle.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp index 2e6034bbcd..b0015956be 100644 --- a/lib/CodeGen/Mangle.cpp +++ b/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/lib/CodeGen/Mangle.h b/lib/CodeGen/Mangle.h index 2cdb4e2391..6ddec589af 100644 --- a/lib/CodeGen/Mangle.h +++ b/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, -- 2.40.0