mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 00:56:04 +00:00
Simplify MS mangling of bultin types (NFC) (#125051)
Saves including 4 files, reduces the number of switch cases, less error prone when adding new types, at the "cost" of adding a` default:`.
This commit is contained in:
parent
b6e50ed209
commit
6303563b40
@ -2810,49 +2810,13 @@ void MicrosoftCXXNameMangler::mangleType(const BuiltinType *T, Qualifiers,
|
||||
break;
|
||||
#include "clang/Basic/HLSLIntangibleTypes.def"
|
||||
|
||||
#define SVE_TYPE(Name, Id, SingletonId) \
|
||||
case BuiltinType::Id:
|
||||
#define SVE_SCALAR_TYPE(Name, MangledName, Id, SingletonId, Bits)
|
||||
#include "clang/Basic/AArch64SVEACLETypes.def"
|
||||
#define PPC_VECTOR_TYPE(Name, Id, Size) \
|
||||
case BuiltinType::Id:
|
||||
#include "clang/Basic/PPCTypes.def"
|
||||
#define RVV_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
|
||||
#include "clang/Basic/RISCVVTypes.def"
|
||||
#define AMDGPU_TYPE(Name, Id, SingletonId, Width, Align) case BuiltinType::Id:
|
||||
#include "clang/Basic/AMDGPUTypes.def"
|
||||
case BuiltinType::ShortAccum:
|
||||
case BuiltinType::Accum:
|
||||
case BuiltinType::LongAccum:
|
||||
case BuiltinType::UShortAccum:
|
||||
case BuiltinType::UAccum:
|
||||
case BuiltinType::ULongAccum:
|
||||
case BuiltinType::ShortFract:
|
||||
case BuiltinType::Fract:
|
||||
case BuiltinType::LongFract:
|
||||
case BuiltinType::UShortFract:
|
||||
case BuiltinType::UFract:
|
||||
case BuiltinType::ULongFract:
|
||||
case BuiltinType::SatShortAccum:
|
||||
case BuiltinType::SatAccum:
|
||||
case BuiltinType::SatLongAccum:
|
||||
case BuiltinType::SatUShortAccum:
|
||||
case BuiltinType::SatUAccum:
|
||||
case BuiltinType::SatULongAccum:
|
||||
case BuiltinType::SatShortFract:
|
||||
case BuiltinType::SatFract:
|
||||
case BuiltinType::SatLongFract:
|
||||
case BuiltinType::SatUShortFract:
|
||||
case BuiltinType::SatUFract:
|
||||
case BuiltinType::SatULongFract:
|
||||
case BuiltinType::Ibm128:
|
||||
case BuiltinType::Float128: {
|
||||
// Issue an error for any type not explicitly handled.
|
||||
default:
|
||||
Error(Range.getBegin(), "built-in type: ",
|
||||
T->getName(Context.getASTContext().getPrintingPolicy()))
|
||||
<< Range;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// <type> ::= <function-type>
|
||||
|
Loading…
x
Reference in New Issue
Block a user