diff options
| author | Douglas Gregor <dgregor@apple.com> | 2009-02-13 01:28:03 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2009-02-13 01:28:03 +0000 |
| commit | adb0201418c5afe0276b5a2afd8502faa75abc93 (patch) | |
| tree | 77941aa158e40612511edef05c74ec369ef214ec /clang/lib/CodeGen | |
| parent | 159a7cbc3626165f1a2e38a9bf6651608a823778 (diff) | |
| download | bcm5719-llvm-adb0201418c5afe0276b5a2afd8502faa75abc93.tar.gz bcm5719-llvm-adb0201418c5afe0276b5a2afd8502faa75abc93.zip | |
Add mangling for variadic functions and conversion functions
llvm-svn: 64425
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/Mangle.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/Mangle.cpp b/clang/lib/CodeGen/Mangle.cpp index a97ac58dd78..9ad98d787a8 100644 --- a/clang/lib/CodeGen/Mangle.cpp +++ b/clang/lib/CodeGen/Mangle.cpp @@ -161,7 +161,9 @@ void CXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND) { break; case DeclarationName::CXXConversionFunctionName: - assert(false && "Not sure how to mangle conversion functions yet"); + // <operator-name> ::= cv <type> # (cast) + Out << "cv"; + mangleType(Context.getCanonicalType(Name.getCXXNameType())); break; case DeclarationName::CXXOperatorName: @@ -171,6 +173,7 @@ void CXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND) { case DeclarationName::CXXUsingDirective: assert(false && "Can't mangle a using directive name!"); + break; } } @@ -398,7 +401,6 @@ void CXXNameMangler::mangleType(const BuiltinType *T) { // ::= d # double // ::= e # long double, __float80 // UNSUPPORTED: ::= g # __float128 - // NOT HERE: ::= z # ellipsis // UNSUPPORTED: ::= Dd # IEEE 754r decimal floating point (64 bits) // UNSUPPORTED: ::= De # IEEE 754r decimal floating point (128 bits) // UNSUPPORTED: ::= Df # IEEE 754r decimal floating point (32 bits) @@ -455,6 +457,10 @@ void CXXNameMangler::mangleBareFunctionType(const FunctionType *T, ArgEnd = Proto->arg_type_end(); Arg != ArgEnd; ++Arg) mangleType(*Arg); + + // <builtin-type> ::= z # ellipsis + if (Proto->isVariadic()) + Out << 'z'; } void CXXNameMangler::mangleType(const TagType *T) { |

