diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2011-12-01 09:55:00 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2011-12-01 09:55:00 +0000 |
commit | 50118da99d3c04eb14747cfdc44a9e1d56432aea (patch) | |
tree | f1da73ae7ac648d28e492a65b846375b1627af34 /lib/AST/MicrosoftMangle.cpp | |
parent | 2aba7115f9df1676d5c1811324cceff1b4c4a356 (diff) |
Add Microsoft mangling of constructors and destructors. Patch by Dmitry!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145581 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/MicrosoftMangle.cpp')
-rw-r--r-- | lib/AST/MicrosoftMangle.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/AST/MicrosoftMangle.cpp b/lib/AST/MicrosoftMangle.cpp index 1a18ef1dc0..42e6c9322d 100644 --- a/lib/AST/MicrosoftMangle.cpp +++ b/lib/AST/MicrosoftMangle.cpp @@ -335,10 +335,12 @@ MicrosoftCXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND, llvm_unreachable("Can't mangle Objective-C selector names here!"); case DeclarationName::CXXConstructorName: - llvm_unreachable("Can't mangle constructors yet!"); + Out << "?0"; + break; case DeclarationName::CXXDestructorName: - llvm_unreachable("Can't mangle destructors yet!"); + Out << "?1"; + break; case DeclarationName::CXXConversionFunctionName: // <operator-name> ::= ?B # (cast) @@ -1168,13 +1170,15 @@ void MicrosoftMangleContext::mangleCXXRTTIName(QualType T, } void MicrosoftMangleContext::mangleCXXCtor(const CXXConstructorDecl *D, CXXCtorType Type, - raw_ostream &) { - llvm_unreachable("Can't yet mangle constructors!"); + raw_ostream & Out) { + MicrosoftCXXNameMangler mangler(*this, Out); + mangler.mangle(D); } void MicrosoftMangleContext::mangleCXXDtor(const CXXDestructorDecl *D, CXXDtorType Type, - raw_ostream &) { - llvm_unreachable("Can't yet mangle destructors!"); + raw_ostream & Out) { + MicrosoftCXXNameMangler mangler(*this, Out); + mangler.mangle(D); } void MicrosoftMangleContext::mangleReferenceTemporary(const clang::VarDecl *, raw_ostream &) { |