diff options
author | Mike Stump <mrs@apple.com> | 2009-07-31 18:25:34 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-07-31 18:25:34 +0000 |
commit | bc78a728ee8aded5962419809afdf24ecafb8551 (patch) | |
tree | 227cea1226b8c80a2155a5311822267df5c1e809 /clang/lib/CodeGen/Mangle.cpp | |
parent | fe6bbd11454bb17009e17c94da96c93607a53168 (diff) | |
download | bcm5719-llvm-bc78a728ee8aded5962419809afdf24ecafb8551.tar.gz bcm5719-llvm-bc78a728ee8aded5962419809afdf24ecafb8551.zip |
Add code to setup the vtable pointer in the constructor. Work in progress.
llvm-svn: 77699
Diffstat (limited to 'clang/lib/CodeGen/Mangle.cpp')
-rw-r--r-- | clang/lib/CodeGen/Mangle.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/Mangle.cpp b/clang/lib/CodeGen/Mangle.cpp index 9e389040b81..36ee2a42222 100644 --- a/clang/lib/CodeGen/Mangle.cpp +++ b/clang/lib/CodeGen/Mangle.cpp @@ -41,6 +41,7 @@ namespace { bool mangle(const NamedDecl *D); void mangleGuardVariable(const VarDecl *D); + void mangleCXXVtable(QualType Type); void mangleCXXCtor(const CXXConstructorDecl *D, CXXCtorType Type); void mangleCXXDtor(const CXXDestructorDecl *D, CXXDtorType Type); @@ -158,10 +159,16 @@ void CXXNameMangler::mangleCXXDtor(const CXXDestructorDecl *D, mangle(D); } +void CXXNameMangler::mangleCXXVtable(QualType T) { + // <special-name> ::= TV <type> # virtual table + Out << "_ZTV"; + mangleType(T); +} + void CXXNameMangler::mangleGuardVariable(const VarDecl *D) { // <special-name> ::= GV <object name> # Guard variable for one-time - // # initialization + // # initialization Out << "_ZGV"; mangleName(D); @@ -807,7 +814,12 @@ namespace clang { os.flush(); } - - -} + void mangleCXXVtable(QualType Type, ASTContext &Context, + llvm::raw_ostream &os) { + CXXNameMangler Mangler(Context, os); + Mangler.mangleCXXVtable(Type); + + os.flush(); + } +} |