19using namespace ms_demangle;
21#define OUTPUT_ENUM_CLASS_VALUE(Enum, Value, Desc) \
32 if (std::isalnum(
C) ||
C ==
'>')
69 size_t Pos1 = OB.getCurrentPosition();
73 size_t Pos2 = OB.getCurrentPosition();
74 if (SpaceAfter && Pos2 > Pos1)
82 case CallingConv::Cdecl:
85 case CallingConv::Fastcall:
88 case CallingConv::Pascal:
91 case CallingConv::Regcall:
94 case CallingConv::Stdcall:
97 case CallingConv::Thiscall:
100 case CallingConv::Eabi:
103 case CallingConv::Vectorcall:
104 OB <<
"__vectorcall";
106 case CallingConv::Clrcall:
110 OB <<
"__attribute__((__swiftcall__)) ";
112 case CallingConv::SwiftAsync:
113 OB <<
"__attribute__((__swiftasynccall__)) ";
122 this->output(OB, Flags);
123 std::string_view SV = OB;
124 std::string Owned(SV.begin(), SV.end());
125 std::free(OB.getBuffer());
163 std::string_view Separator)
const {
168 for (
size_t I = 1;
I <
Count; ++
I) {
235 OB <<
"`dynamic atexit destructor for ";
237 OB <<
"`dynamic initializer for ";
306 "`vector deleting dtor'");
308 "`default ctor closure'");
310 "`scalar deleting dtor'");
312 "`vector ctor iterator'");
314 "`vector dtor iterator'");
316 "`vector vbase ctor iterator'");
318 "`virtual displacement map'");
320 "`eh vector ctor iterator'");
322 "`eh vector dtor iterator'");
324 "`eh vector vbase ctor iterator'");
326 "`copy ctor closure'");
328 "`local vftable ctor closure'");
331 "operator delete[]");
333 "`managed vector ctor iterator'");
335 "`managed vector dtor iterator'");
337 "`EH vector copy ctor iterator'");
339 "`EH vector vbase copy ctor iterator'");
341 "`vector copy ctor iterator'");
343 "`vector vbase copy constructor iterator'");
345 "`managed vector vbase copy constructor iterator'");
347 "operator co_await");
359 OB <<
"`local static thread guard'";
361 OB <<
"`local static guard'";
383 OB <<
"operator \"\"" <<
Name;
407 OB <<
"extern \"C\" ";
429 if (OB.back() !=
'(')
443 OB <<
" __unaligned";
493 OB <<
"__unaligned ";
595 const char *AccessSpec =
nullptr;
596 bool IsStatic =
true;
599 AccessSpec =
"private";
602 AccessSpec =
"public";
605 AccessSpec =
"protected";
612 OB << AccessSpec <<
": ";
617 Type->outputPre(OB, Flags);
622 Type->outputPost(OB, Flags);
636 OB <<
"`RTTI Base Class Descriptor at (";
static void outputCallingConvention(OutputBuffer &OB, CallingConv CC)
#define OUTPUT_ENUM_CLASS_VALUE(Enum, Value, Desc)
static void outputSingleQualifier(OutputBuffer &OB, Qualifiers Q)
static bool outputQualifierIfPresent(OutputBuffer &OB, Qualifiers Q, Qualifiers Mask, bool NeedSpace)
static void outputQualifiers(OutputBuffer &OB, Qualifiers Q, bool SpaceBefore, bool SpaceAfter)
static void outputSpaceIfNecessary(OutputBuffer &OB)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This is a utility class that provides an abstraction for the common functionality between Instruction...
The instances of the Type class are immutable: once they are created, they are never changed.
@ Swift
Calling convention for Swift.
@ C
The default llvm calling convention, compatible with C.
@ ManVectorVbaseCopyCtorIter
@ EHVectorVbaseCopyCtorIter
@ LocalVftableCtorClosure
@ VectorVbaseCopyCtorIter
This is an optimization pass for GlobalISel generic memory operations.
void outputPost(OutputBuffer &OB, OutputFlags Flags) const override
void outputOneDimension(OutputBuffer &OB, OutputFlags Flags, Node *N) const
NodeArrayNode * Dimensions
void outputPre(OutputBuffer &OB, OutputFlags Flags) const override
void outputDimensionsImpl(OutputBuffer &OB, OutputFlags Flags) const
void output(OutputBuffer &OB, OutputFlags Flags) const override
void outputPost(OutputBuffer &OB, OutputFlags Flags) const override
void outputPre(OutputBuffer &OB, OutputFlags Flags) const override
IdentifierNode * Identifier
void output(OutputBuffer &OB, OutputFlags Flags) const override
VariableSymbolNode * Variable
void output(OutputBuffer &OB, OutputFlags Flags) const override
std::string_view DecodedString
void outputPre(OutputBuffer &OB, OutputFlags Flags) const override
void outputPost(OutputBuffer &OB, OutputFlags Flags) const override
FunctionRefQualifier RefQualifier
CallingConv CallConvention
FunctionSignatureNode * Signature
void output(OutputBuffer &OB, OutputFlags Flags) const override
NodeArrayNode * TemplateParams
void outputTemplateParameters(OutputBuffer &OB, OutputFlags Flags) const
void output(OutputBuffer &OB, OutputFlags Flags) const override
void output(OutputBuffer &OB, OutputFlags Flags) const override
void output(OutputBuffer &OB, OutputFlags Flags) const override
void output(OutputBuffer &OB, OutputFlags Flags) const override
void output(OutputBuffer &OB, OutputFlags Flags) const override
void output(OutputBuffer &OB, OutputFlags Flags) const override
void output(OutputBuffer &OB, OutputFlags Flags) const override
virtual void output(OutputBuffer &OB, OutputFlags Flags) const =0
QualifiedNameNode * ClassParent
void outputPost(OutputBuffer &OB, OutputFlags Flags) const override
void outputPre(OutputBuffer &OB, OutputFlags Flags) const override
void outputPre(OutputBuffer &OB, OutputFlags Flags) const override
void output(OutputBuffer &OB, OutputFlags Flags) const override
NodeArrayNode * Components
void output(OutputBuffer &OB, OutputFlags Flags) const override
void output(OutputBuffer &OB, OutputFlags Flags) const override
QualifiedNameNode * TargetName
void output(OutputBuffer &OB, OutputFlags Flags) const override
void output(OutputBuffer &OB, OutputFlags Flags) const override
void outputPost(OutputBuffer &OB, OutputFlags Flags) const override
void outputPre(OutputBuffer &OB, OutputFlags Flags) const override
void output(OutputBuffer &OB, OutputFlags Flags) const override
std::array< int64_t, 3 > ThunkOffsets
void outputPost(OutputBuffer &OB, OutputFlags Flags) const override
void outputPre(OutputBuffer &OB, OutputFlags Flags) const override
void output(OutputBuffer &OB, OutputFlags Flags) const override
virtual void outputPre(OutputBuffer &OB, OutputFlags Flags) const =0
virtual void outputPost(OutputBuffer &OB, OutputFlags Flags) const =0
void output(OutputBuffer &OB, OutputFlags Flags) const override
void output(OutputBuffer &OB, OutputFlags Flags) const override