forked from OSchip/llvm-project
[-cxx-abi microsoft] Remove trailing spaces from the mangler
No functional change, just a tidying up. llvm-svn: 197196
This commit is contained in:
parent
9855994d81
commit
b4119f7459
|
@ -157,7 +157,7 @@ private:
|
|||
#undef ABSTRACT_TYPE
|
||||
#undef NON_CANONICAL_TYPE
|
||||
#undef TYPE
|
||||
|
||||
|
||||
void mangleType(const TagDecl *TD);
|
||||
void mangleDecayedArrayType(const ArrayType *T);
|
||||
void mangleArrayType(const ArrayType *T);
|
||||
|
@ -324,7 +324,7 @@ void MicrosoftCXXNameMangler::mangleVariableEncoding(const VarDecl *VD) {
|
|||
// ::= 2 # public static member
|
||||
// ::= 3 # global
|
||||
// ::= 4 # static local
|
||||
|
||||
|
||||
// The first character in the encoding (after the name) is the storage class.
|
||||
if (VD->isStaticDataMember()) {
|
||||
// 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();
|
||||
|
||||
// Always start with the unqualified name.
|
||||
mangleUnqualifiedName(ND);
|
||||
mangleUnqualifiedName(ND);
|
||||
|
||||
// If this is an extern variable declared locally, the relevant DeclContext
|
||||
// is that of the containing namespace, or the translation unit.
|
||||
|
@ -506,17 +506,17 @@ MicrosoftCXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND,
|
|||
mangleSourceName(II->getName());
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// Otherwise, an anonymous entity. We must have a declaration.
|
||||
assert(ND && "mangling empty name without declaration");
|
||||
|
||||
|
||||
if (const NamespaceDecl *NS = dyn_cast<NamespaceDecl>(ND)) {
|
||||
if (NS->isAnonymousNamespace()) {
|
||||
Out << "?A@";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// We must have an anonymous struct.
|
||||
const TagDecl *TD = cast<TagDecl>(ND);
|
||||
if (const TypedefNameDecl *D = TD->getTypedefNameForAnonDecl()) {
|
||||
|
@ -542,12 +542,12 @@ MicrosoftCXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND,
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case DeclarationName::ObjCZeroArgSelector:
|
||||
case DeclarationName::ObjCOneArgSelector:
|
||||
case DeclarationName::ObjCMultiArgSelector:
|
||||
llvm_unreachable("Can't mangle Objective-C selector names here!");
|
||||
|
||||
|
||||
case DeclarationName::CXXConstructorName:
|
||||
if (ND == Structor) {
|
||||
assert(StructorType == Ctor_Complete &&
|
||||
|
@ -555,7 +555,7 @@ MicrosoftCXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND,
|
|||
}
|
||||
Out << "?0";
|
||||
break;
|
||||
|
||||
|
||||
case DeclarationName::CXXDestructorName:
|
||||
if (ND == Structor)
|
||||
// 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.
|
||||
mangleCXXDtorType(Dtor_Base);
|
||||
break;
|
||||
|
||||
|
||||
case DeclarationName::CXXConversionFunctionName:
|
||||
// <operator-name> ::= ?B # (cast)
|
||||
// The target type is encoded as the return type.
|
||||
Out << "?B";
|
||||
break;
|
||||
|
||||
|
||||
case DeclarationName::CXXOperatorName:
|
||||
mangleOperatorName(Name.getCXXOverloadedOperator(), ND->getLocation());
|
||||
break;
|
||||
|
||||
|
||||
case DeclarationName::CXXLiteralOperatorName: {
|
||||
// FIXME: Was this added in VS2010? Does MS even know how to mangle this?
|
||||
DiagnosticsEngine Diags = Context.getDiags();
|
||||
|
@ -585,7 +585,7 @@ MicrosoftCXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND,
|
|||
Diags.Report(ND->getLocation(), DiagID);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case DeclarationName::CXXUsingDirective:
|
||||
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;
|
||||
// <operator-name> ::= ?_V # delete[]
|
||||
case OO_Array_Delete: Out << "?_V"; break;
|
||||
|
||||
|
||||
case OO_Conditional: {
|
||||
DiagnosticsEngine &Diags = Context.getDiags();
|
||||
unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error,
|
||||
|
@ -776,7 +776,7 @@ void MicrosoftCXXNameMangler::mangleOperatorName(OverloadedOperatorKind OO,
|
|||
Diags.Report(Loc, DiagID);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case OO_None:
|
||||
case NUM_OVERLOADED_OPERATORS:
|
||||
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::OCLSampler: Out << "PAUocl_sampler@@"; break;
|
||||
case BuiltinType::OCLEvent: Out << "PAUocl_event@@"; break;
|
||||
|
||||
|
||||
case BuiltinType::NullPtr: Out << "$$T"; break;
|
||||
|
||||
case BuiltinType::Char16:
|
||||
|
|
Loading…
Reference in New Issue