[-cxx-abi microsoft] Remove trailing spaces from the mangler

No functional change, just a tidying up.

llvm-svn: 197196
This commit is contained in:
David Majnemer 2013-12-13 01:06:04 +00:00
parent 9855994d81
commit b4119f7459
1 changed files with 16 additions and 16 deletions

View File

@ -157,7 +157,7 @@ private:
#undef ABSTRACT_TYPE #undef ABSTRACT_TYPE
#undef NON_CANONICAL_TYPE #undef NON_CANONICAL_TYPE
#undef TYPE #undef TYPE
void mangleType(const TagDecl *TD); void mangleType(const TagDecl *TD);
void mangleDecayedArrayType(const ArrayType *T); void mangleDecayedArrayType(const ArrayType *T);
void mangleArrayType(const ArrayType *T); void mangleArrayType(const ArrayType *T);
@ -324,7 +324,7 @@ void MicrosoftCXXNameMangler::mangleVariableEncoding(const VarDecl *VD) {
// ::= 2 # public static member // ::= 2 # public static member
// ::= 3 # global // ::= 3 # global
// ::= 4 # static local // ::= 4 # static local
// The first character in the encoding (after the name) is the storage class. // The first character in the encoding (after the name) is the storage class.
if (VD->isStaticDataMember()) { if (VD->isStaticDataMember()) {
// If it's a static member, it also encodes the access level. // If it's a static member, it also encodes the access level.
@ -376,7 +376,7 @@ void MicrosoftCXXNameMangler::mangleName(const NamedDecl *ND) {
const DeclContext *DC = ND->getDeclContext(); const DeclContext *DC = ND->getDeclContext();
// Always start with the unqualified name. // Always start with the unqualified name.
mangleUnqualifiedName(ND); mangleUnqualifiedName(ND);
// If this is an extern variable declared locally, the relevant DeclContext // If this is an extern variable declared locally, the relevant DeclContext
// is that of the containing namespace, or the translation unit. // is that of the containing namespace, or the translation unit.
@ -506,17 +506,17 @@ MicrosoftCXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND,
mangleSourceName(II->getName()); mangleSourceName(II->getName());
break; break;
} }
// Otherwise, an anonymous entity. We must have a declaration. // Otherwise, an anonymous entity. We must have a declaration.
assert(ND && "mangling empty name without declaration"); assert(ND && "mangling empty name without declaration");
if (const NamespaceDecl *NS = dyn_cast<NamespaceDecl>(ND)) { if (const NamespaceDecl *NS = dyn_cast<NamespaceDecl>(ND)) {
if (NS->isAnonymousNamespace()) { if (NS->isAnonymousNamespace()) {
Out << "?A@"; Out << "?A@";
break; break;
} }
} }
// We must have an anonymous struct. // We must have an anonymous struct.
const TagDecl *TD = cast<TagDecl>(ND); const TagDecl *TD = cast<TagDecl>(ND);
if (const TypedefNameDecl *D = TD->getTypedefNameForAnonDecl()) { if (const TypedefNameDecl *D = TD->getTypedefNameForAnonDecl()) {
@ -542,12 +542,12 @@ MicrosoftCXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND,
} }
break; break;
} }
case DeclarationName::ObjCZeroArgSelector: case DeclarationName::ObjCZeroArgSelector:
case DeclarationName::ObjCOneArgSelector: case DeclarationName::ObjCOneArgSelector:
case DeclarationName::ObjCMultiArgSelector: case DeclarationName::ObjCMultiArgSelector:
llvm_unreachable("Can't mangle Objective-C selector names here!"); llvm_unreachable("Can't mangle Objective-C selector names here!");
case DeclarationName::CXXConstructorName: case DeclarationName::CXXConstructorName:
if (ND == Structor) { if (ND == Structor) {
assert(StructorType == Ctor_Complete && assert(StructorType == Ctor_Complete &&
@ -555,7 +555,7 @@ MicrosoftCXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND,
} }
Out << "?0"; Out << "?0";
break; break;
case DeclarationName::CXXDestructorName: case DeclarationName::CXXDestructorName:
if (ND == Structor) if (ND == Structor)
// If the named decl is the C++ destructor we're mangling, // If the named decl is the C++ destructor we're mangling,
@ -566,17 +566,17 @@ MicrosoftCXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND,
// class with a destructor is declared within a destructor. // class with a destructor is declared within a destructor.
mangleCXXDtorType(Dtor_Base); mangleCXXDtorType(Dtor_Base);
break; break;
case DeclarationName::CXXConversionFunctionName: case DeclarationName::CXXConversionFunctionName:
// <operator-name> ::= ?B # (cast) // <operator-name> ::= ?B # (cast)
// The target type is encoded as the return type. // The target type is encoded as the return type.
Out << "?B"; Out << "?B";
break; break;
case DeclarationName::CXXOperatorName: case DeclarationName::CXXOperatorName:
mangleOperatorName(Name.getCXXOverloadedOperator(), ND->getLocation()); mangleOperatorName(Name.getCXXOverloadedOperator(), ND->getLocation());
break; break;
case DeclarationName::CXXLiteralOperatorName: { case DeclarationName::CXXLiteralOperatorName: {
// FIXME: Was this added in VS2010? Does MS even know how to mangle this? // FIXME: Was this added in VS2010? Does MS even know how to mangle this?
DiagnosticsEngine Diags = Context.getDiags(); DiagnosticsEngine Diags = Context.getDiags();
@ -585,7 +585,7 @@ MicrosoftCXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND,
Diags.Report(ND->getLocation(), DiagID); Diags.Report(ND->getLocation(), DiagID);
break; break;
} }
case DeclarationName::CXXUsingDirective: case DeclarationName::CXXUsingDirective:
llvm_unreachable("Can't mangle a using directive name!"); llvm_unreachable("Can't mangle a using directive name!");
} }
@ -768,7 +768,7 @@ void MicrosoftCXXNameMangler::mangleOperatorName(OverloadedOperatorKind OO,
case OO_Array_New: Out << "?_U"; break; case OO_Array_New: Out << "?_U"; break;
// <operator-name> ::= ?_V # delete[] // <operator-name> ::= ?_V # delete[]
case OO_Array_Delete: Out << "?_V"; break; case OO_Array_Delete: Out << "?_V"; break;
case OO_Conditional: { case OO_Conditional: {
DiagnosticsEngine &Diags = Context.getDiags(); DiagnosticsEngine &Diags = Context.getDiags();
unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error, unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error,
@ -776,7 +776,7 @@ void MicrosoftCXXNameMangler::mangleOperatorName(OverloadedOperatorKind OO,
Diags.Report(Loc, DiagID); Diags.Report(Loc, DiagID);
break; break;
} }
case OO_None: case OO_None:
case NUM_OVERLOADED_OPERATORS: case NUM_OVERLOADED_OPERATORS:
llvm_unreachable("Not an overloaded operator"); llvm_unreachable("Not an overloaded operator");
@ -1254,7 +1254,7 @@ void MicrosoftCXXNameMangler::mangleType(const BuiltinType *T,
case BuiltinType::OCLImage3d: Out << "PAUocl_image3d@@"; break; case BuiltinType::OCLImage3d: Out << "PAUocl_image3d@@"; break;
case BuiltinType::OCLSampler: Out << "PAUocl_sampler@@"; break; case BuiltinType::OCLSampler: Out << "PAUocl_sampler@@"; break;
case BuiltinType::OCLEvent: Out << "PAUocl_event@@"; break; case BuiltinType::OCLEvent: Out << "PAUocl_event@@"; break;
case BuiltinType::NullPtr: Out << "$$T"; break; case BuiltinType::NullPtr: Out << "$$T"; break;
case BuiltinType::Char16: case BuiltinType::Char16: