2020-12-18 17:56:41 +01:00
|
|
|
//===- MicrosoftDemangle.cpp ----------------------------------------------===//
|
|
|
|
//
|
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file defines a demangler for MSVC-style mangled symbols.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "llvm/Demangle/MicrosoftDemangleNodes.h"
|
|
|
|
#include "llvm/Demangle/Utility.h"
|
|
|
|
#include <cctype>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
using namespace llvm;
|
|
|
|
using namespace ms_demangle;
|
|
|
|
|
|
|
|
#define OUTPUT_ENUM_CLASS_VALUE(Enum, Value, Desc) \
|
|
|
|
case Enum::Value: \
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << Desc; \
|
2020-12-18 17:56:41 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
// Writes a space if the last token does not end with a punctuation.
|
2022-08-09 13:51:03 +02:00
|
|
|
static void outputSpaceIfNecessary(OutputBuffer &OB) {
|
|
|
|
if (OB.empty())
|
2020-12-18 17:56:41 +01:00
|
|
|
return;
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
char C = OB.back();
|
2020-12-18 17:56:41 +01:00
|
|
|
if (std::isalnum(C) || C == '>')
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << " ";
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
static void outputSingleQualifier(OutputBuffer &OB, Qualifiers Q) {
|
2020-12-18 17:56:41 +01:00
|
|
|
switch (Q) {
|
|
|
|
case Q_Const:
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "const";
|
2020-12-18 17:56:41 +01:00
|
|
|
break;
|
|
|
|
case Q_Volatile:
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "volatile";
|
2020-12-18 17:56:41 +01:00
|
|
|
break;
|
|
|
|
case Q_Restrict:
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "__restrict";
|
2020-12-18 17:56:41 +01:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
static bool outputQualifierIfPresent(OutputBuffer &OB, Qualifiers Q,
|
2020-12-18 17:56:41 +01:00
|
|
|
Qualifiers Mask, bool NeedSpace) {
|
|
|
|
if (!(Q & Mask))
|
|
|
|
return NeedSpace;
|
|
|
|
|
|
|
|
if (NeedSpace)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << " ";
|
2020-12-18 17:56:41 +01:00
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
outputSingleQualifier(OB, Mask);
|
2020-12-18 17:56:41 +01:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
static void outputQualifiers(OutputBuffer &OB, Qualifiers Q, bool SpaceBefore,
|
2020-12-18 17:56:41 +01:00
|
|
|
bool SpaceAfter) {
|
|
|
|
if (Q == Q_None)
|
|
|
|
return;
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
size_t Pos1 = OB.getCurrentPosition();
|
|
|
|
SpaceBefore = outputQualifierIfPresent(OB, Q, Q_Const, SpaceBefore);
|
|
|
|
SpaceBefore = outputQualifierIfPresent(OB, Q, Q_Volatile, SpaceBefore);
|
|
|
|
SpaceBefore = outputQualifierIfPresent(OB, Q, Q_Restrict, SpaceBefore);
|
|
|
|
size_t Pos2 = OB.getCurrentPosition();
|
2020-12-18 17:56:41 +01:00
|
|
|
if (SpaceAfter && Pos2 > Pos1)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << " ";
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
static void outputCallingConvention(OutputBuffer &OB, CallingConv CC) {
|
|
|
|
outputSpaceIfNecessary(OB);
|
2020-12-18 17:56:41 +01:00
|
|
|
|
|
|
|
switch (CC) {
|
|
|
|
case CallingConv::Cdecl:
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "__cdecl";
|
2020-12-18 17:56:41 +01:00
|
|
|
break;
|
|
|
|
case CallingConv::Fastcall:
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "__fastcall";
|
2020-12-18 17:56:41 +01:00
|
|
|
break;
|
|
|
|
case CallingConv::Pascal:
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "__pascal";
|
2020-12-18 17:56:41 +01:00
|
|
|
break;
|
|
|
|
case CallingConv::Regcall:
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "__regcall";
|
2020-12-18 17:56:41 +01:00
|
|
|
break;
|
|
|
|
case CallingConv::Stdcall:
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "__stdcall";
|
2020-12-18 17:56:41 +01:00
|
|
|
break;
|
|
|
|
case CallingConv::Thiscall:
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "__thiscall";
|
2020-12-18 17:56:41 +01:00
|
|
|
break;
|
|
|
|
case CallingConv::Eabi:
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "__eabi";
|
2020-12-18 17:56:41 +01:00
|
|
|
break;
|
|
|
|
case CallingConv::Vectorcall:
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "__vectorcall";
|
2020-12-18 17:56:41 +01:00
|
|
|
break;
|
|
|
|
case CallingConv::Clrcall:
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "__clrcall";
|
|
|
|
break;
|
|
|
|
case CallingConv::Swift:
|
|
|
|
OB << "__attribute__((__swiftcall__)) ";
|
|
|
|
break;
|
|
|
|
case CallingConv::SwiftAsync:
|
|
|
|
OB << "__attribute__((__swiftasynccall__)) ";
|
2020-12-18 17:56:41 +01:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string Node::toString(OutputFlags Flags) const {
|
2022-08-09 13:51:03 +02:00
|
|
|
OutputBuffer OB;
|
|
|
|
initializeOutputBuffer(nullptr, nullptr, OB, 1024);
|
|
|
|
this->output(OB, Flags);
|
|
|
|
StringView SV = OB;
|
|
|
|
std::string Owned(SV.begin(), SV.end());
|
|
|
|
std::free(OB.getBuffer());
|
|
|
|
return Owned;
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void PrimitiveTypeNode::outputPre(OutputBuffer &OB, OutputFlags Flags) const {
|
2020-12-18 17:56:41 +01:00
|
|
|
switch (PrimKind) {
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(PrimitiveKind, Void, "void");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(PrimitiveKind, Bool, "bool");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(PrimitiveKind, Char, "char");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(PrimitiveKind, Schar, "signed char");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(PrimitiveKind, Uchar, "unsigned char");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(PrimitiveKind, Char8, "char8_t");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(PrimitiveKind, Char16, "char16_t");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(PrimitiveKind, Char32, "char32_t");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(PrimitiveKind, Short, "short");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(PrimitiveKind, Ushort, "unsigned short");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(PrimitiveKind, Int, "int");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(PrimitiveKind, Uint, "unsigned int");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(PrimitiveKind, Long, "long");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(PrimitiveKind, Ulong, "unsigned long");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(PrimitiveKind, Int64, "__int64");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(PrimitiveKind, Uint64, "unsigned __int64");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(PrimitiveKind, Wchar, "wchar_t");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(PrimitiveKind, Float, "float");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(PrimitiveKind, Double, "double");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(PrimitiveKind, Ldouble, "long double");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(PrimitiveKind, Nullptr, "std::nullptr_t");
|
|
|
|
}
|
2022-08-09 13:51:03 +02:00
|
|
|
outputQualifiers(OB, Quals, true, false);
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void NodeArrayNode::output(OutputBuffer &OB, OutputFlags Flags) const {
|
|
|
|
output(OB, Flags, ", ");
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void NodeArrayNode::output(OutputBuffer &OB, OutputFlags Flags,
|
2020-12-18 17:56:41 +01:00
|
|
|
StringView Separator) const {
|
|
|
|
if (Count == 0)
|
|
|
|
return;
|
|
|
|
if (Nodes[0])
|
2022-08-09 13:51:03 +02:00
|
|
|
Nodes[0]->output(OB, Flags);
|
2020-12-18 17:56:41 +01:00
|
|
|
for (size_t I = 1; I < Count; ++I) {
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << Separator;
|
|
|
|
Nodes[I]->output(OB, Flags);
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void EncodedStringLiteralNode::output(OutputBuffer &OB,
|
2020-12-18 17:56:41 +01:00
|
|
|
OutputFlags Flags) const {
|
|
|
|
switch (Char) {
|
|
|
|
case CharKind::Wchar:
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "L\"";
|
2020-12-18 17:56:41 +01:00
|
|
|
break;
|
|
|
|
case CharKind::Char:
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "\"";
|
2020-12-18 17:56:41 +01:00
|
|
|
break;
|
|
|
|
case CharKind::Char16:
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "u\"";
|
2020-12-18 17:56:41 +01:00
|
|
|
break;
|
|
|
|
case CharKind::Char32:
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "U\"";
|
2020-12-18 17:56:41 +01:00
|
|
|
break;
|
|
|
|
}
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << DecodedString << "\"";
|
2020-12-18 17:56:41 +01:00
|
|
|
if (IsTruncated)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "...";
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void IntegerLiteralNode::output(OutputBuffer &OB, OutputFlags Flags) const {
|
2020-12-18 17:56:41 +01:00
|
|
|
if (IsNegative)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << '-';
|
|
|
|
OB << Value;
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void TemplateParameterReferenceNode::output(OutputBuffer &OB,
|
2020-12-18 17:56:41 +01:00
|
|
|
OutputFlags Flags) const {
|
|
|
|
if (ThunkOffsetCount > 0)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "{";
|
2020-12-18 17:56:41 +01:00
|
|
|
else if (Affinity == PointerAffinity::Pointer)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "&";
|
2020-12-18 17:56:41 +01:00
|
|
|
|
|
|
|
if (Symbol) {
|
2022-08-09 13:51:03 +02:00
|
|
|
Symbol->output(OB, Flags);
|
2020-12-18 17:56:41 +01:00
|
|
|
if (ThunkOffsetCount > 0)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << ", ";
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (ThunkOffsetCount > 0)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << ThunkOffsets[0];
|
2020-12-18 17:56:41 +01:00
|
|
|
for (int I = 1; I < ThunkOffsetCount; ++I) {
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << ", " << ThunkOffsets[I];
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
if (ThunkOffsetCount > 0)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "}";
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void IdentifierNode::outputTemplateParameters(OutputBuffer &OB,
|
2020-12-18 17:56:41 +01:00
|
|
|
OutputFlags Flags) const {
|
|
|
|
if (!TemplateParams)
|
|
|
|
return;
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "<";
|
|
|
|
TemplateParams->output(OB, Flags);
|
|
|
|
OB << ">";
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void DynamicStructorIdentifierNode::output(OutputBuffer &OB,
|
2020-12-18 17:56:41 +01:00
|
|
|
OutputFlags Flags) const {
|
|
|
|
if (IsDestructor)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "`dynamic atexit destructor for ";
|
2020-12-18 17:56:41 +01:00
|
|
|
else
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "`dynamic initializer for ";
|
2020-12-18 17:56:41 +01:00
|
|
|
|
|
|
|
if (Variable) {
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "`";
|
|
|
|
Variable->output(OB, Flags);
|
|
|
|
OB << "''";
|
2020-12-18 17:56:41 +01:00
|
|
|
} else {
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "'";
|
|
|
|
Name->output(OB, Flags);
|
|
|
|
OB << "''";
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void NamedIdentifierNode::output(OutputBuffer &OB, OutputFlags Flags) const {
|
|
|
|
OB << Name;
|
|
|
|
outputTemplateParameters(OB, Flags);
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void IntrinsicFunctionIdentifierNode::output(OutputBuffer &OB,
|
2020-12-18 17:56:41 +01:00
|
|
|
OutputFlags Flags) const {
|
|
|
|
switch (Operator) {
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, New, "operator new");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, Delete, "operator delete");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, Assign, "operator=");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, RightShift, "operator>>");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, LeftShift, "operator<<");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, LogicalNot, "operator!");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, Equals, "operator==");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, NotEquals, "operator!=");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, ArraySubscript,
|
|
|
|
"operator[]");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, Pointer, "operator->");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, Increment, "operator++");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, Decrement, "operator--");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, Minus, "operator-");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, Plus, "operator+");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, Dereference, "operator*");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, BitwiseAnd, "operator&");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, MemberPointer,
|
|
|
|
"operator->*");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, Divide, "operator/");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, Modulus, "operator%");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, LessThan, "operator<");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, LessThanEqual, "operator<=");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, GreaterThan, "operator>");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, GreaterThanEqual,
|
|
|
|
"operator>=");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, Comma, "operator,");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, Parens, "operator()");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, BitwiseNot, "operator~");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, BitwiseXor, "operator^");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, BitwiseOr, "operator|");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, LogicalAnd, "operator&&");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, LogicalOr, "operator||");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, TimesEqual, "operator*=");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, PlusEqual, "operator+=");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, MinusEqual, "operator-=");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, DivEqual, "operator/=");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, ModEqual, "operator%=");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, RshEqual, "operator>>=");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, LshEqual, "operator<<=");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, BitwiseAndEqual,
|
|
|
|
"operator&=");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, BitwiseOrEqual,
|
|
|
|
"operator|=");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, BitwiseXorEqual,
|
|
|
|
"operator^=");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, VbaseDtor, "`vbase dtor'");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, VecDelDtor,
|
|
|
|
"`vector deleting dtor'");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, DefaultCtorClosure,
|
|
|
|
"`default ctor closure'");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, ScalarDelDtor,
|
|
|
|
"`scalar deleting dtor'");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, VecCtorIter,
|
|
|
|
"`vector ctor iterator'");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, VecDtorIter,
|
|
|
|
"`vector dtor iterator'");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, VecVbaseCtorIter,
|
|
|
|
"`vector vbase ctor iterator'");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, VdispMap,
|
|
|
|
"`virtual displacement map'");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, EHVecCtorIter,
|
|
|
|
"`eh vector ctor iterator'");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, EHVecDtorIter,
|
|
|
|
"`eh vector dtor iterator'");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, EHVecVbaseCtorIter,
|
|
|
|
"`eh vector vbase ctor iterator'");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, CopyCtorClosure,
|
|
|
|
"`copy ctor closure'");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, LocalVftableCtorClosure,
|
|
|
|
"`local vftable ctor closure'");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, ArrayNew, "operator new[]");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, ArrayDelete,
|
|
|
|
"operator delete[]");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, ManVectorCtorIter,
|
|
|
|
"`managed vector ctor iterator'");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, ManVectorDtorIter,
|
|
|
|
"`managed vector dtor iterator'");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, EHVectorCopyCtorIter,
|
|
|
|
"`EH vector copy ctor iterator'");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, EHVectorVbaseCopyCtorIter,
|
|
|
|
"`EH vector vbase copy ctor iterator'");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, VectorCopyCtorIter,
|
|
|
|
"`vector copy ctor iterator'");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, VectorVbaseCopyCtorIter,
|
|
|
|
"`vector vbase copy constructor iterator'");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, ManVectorVbaseCopyCtorIter,
|
|
|
|
"`managed vector vbase copy constructor iterator'");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, CoAwait,
|
|
|
|
"operator co_await");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, Spaceship, "operator<=>");
|
|
|
|
case IntrinsicFunctionKind::MaxIntrinsic:
|
|
|
|
case IntrinsicFunctionKind::None:
|
|
|
|
break;
|
|
|
|
}
|
2022-08-09 13:51:03 +02:00
|
|
|
outputTemplateParameters(OB, Flags);
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void LocalStaticGuardIdentifierNode::output(OutputBuffer &OB,
|
2020-12-18 17:56:41 +01:00
|
|
|
OutputFlags Flags) const {
|
|
|
|
if (IsThread)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "`local static thread guard'";
|
2020-12-18 17:56:41 +01:00
|
|
|
else
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "`local static guard'";
|
2020-12-18 17:56:41 +01:00
|
|
|
if (ScopeIndex > 0)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "{" << ScopeIndex << "}";
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void ConversionOperatorIdentifierNode::output(OutputBuffer &OB,
|
2020-12-18 17:56:41 +01:00
|
|
|
OutputFlags Flags) const {
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "operator";
|
|
|
|
outputTemplateParameters(OB, Flags);
|
|
|
|
OB << " ";
|
|
|
|
TargetType->output(OB, Flags);
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void StructorIdentifierNode::output(OutputBuffer &OB, OutputFlags Flags) const {
|
2020-12-18 17:56:41 +01:00
|
|
|
if (IsDestructor)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "~";
|
|
|
|
Class->output(OB, Flags);
|
|
|
|
outputTemplateParameters(OB, Flags);
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void LiteralOperatorIdentifierNode::output(OutputBuffer &OB,
|
2020-12-18 17:56:41 +01:00
|
|
|
OutputFlags Flags) const {
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "operator \"\"" << Name;
|
|
|
|
outputTemplateParameters(OB, Flags);
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void FunctionSignatureNode::outputPre(OutputBuffer &OB,
|
2020-12-18 17:56:41 +01:00
|
|
|
OutputFlags Flags) const {
|
|
|
|
if (!(Flags & OF_NoAccessSpecifier)) {
|
|
|
|
if (FunctionClass & FC_Public)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "public: ";
|
2020-12-18 17:56:41 +01:00
|
|
|
if (FunctionClass & FC_Protected)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "protected: ";
|
2020-12-18 17:56:41 +01:00
|
|
|
if (FunctionClass & FC_Private)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "private: ";
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!(Flags & OF_NoMemberType)) {
|
|
|
|
if (!(FunctionClass & FC_Global)) {
|
|
|
|
if (FunctionClass & FC_Static)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "static ";
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
if (FunctionClass & FC_Virtual)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "virtual ";
|
2020-12-18 17:56:41 +01:00
|
|
|
|
|
|
|
if (FunctionClass & FC_ExternC)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "extern \"C\" ";
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!(Flags & OF_NoReturnType) && ReturnType) {
|
2022-08-09 13:51:03 +02:00
|
|
|
ReturnType->outputPre(OB, Flags);
|
|
|
|
OB << " ";
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!(Flags & OF_NoCallingConvention))
|
2022-08-09 13:51:03 +02:00
|
|
|
outputCallingConvention(OB, CallConvention);
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void FunctionSignatureNode::outputPost(OutputBuffer &OB,
|
2020-12-18 17:56:41 +01:00
|
|
|
OutputFlags Flags) const {
|
|
|
|
if (!(FunctionClass & FC_NoParameterList)) {
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "(";
|
2020-12-18 17:56:41 +01:00
|
|
|
if (Params)
|
2022-08-09 13:51:03 +02:00
|
|
|
Params->output(OB, Flags);
|
2020-12-18 17:56:41 +01:00
|
|
|
else
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "void";
|
2020-12-18 17:56:41 +01:00
|
|
|
|
|
|
|
if (IsVariadic) {
|
2022-08-09 13:51:03 +02:00
|
|
|
if (OB.back() != '(')
|
|
|
|
OB << ", ";
|
|
|
|
OB << "...";
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << ")";
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (Quals & Q_Const)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << " const";
|
2020-12-18 17:56:41 +01:00
|
|
|
if (Quals & Q_Volatile)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << " volatile";
|
2020-12-18 17:56:41 +01:00
|
|
|
if (Quals & Q_Restrict)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << " __restrict";
|
2020-12-18 17:56:41 +01:00
|
|
|
if (Quals & Q_Unaligned)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << " __unaligned";
|
2020-12-18 17:56:41 +01:00
|
|
|
|
|
|
|
if (IsNoexcept)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << " noexcept";
|
2020-12-18 17:56:41 +01:00
|
|
|
|
|
|
|
if (RefQualifier == FunctionRefQualifier::Reference)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << " &";
|
2020-12-18 17:56:41 +01:00
|
|
|
else if (RefQualifier == FunctionRefQualifier::RValueReference)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << " &&";
|
2020-12-18 17:56:41 +01:00
|
|
|
|
|
|
|
if (!(Flags & OF_NoReturnType) && ReturnType)
|
2022-08-09 13:51:03 +02:00
|
|
|
ReturnType->outputPost(OB, Flags);
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void ThunkSignatureNode::outputPre(OutputBuffer &OB, OutputFlags Flags) const {
|
|
|
|
OB << "[thunk]: ";
|
2020-12-18 17:56:41 +01:00
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
FunctionSignatureNode::outputPre(OB, Flags);
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void ThunkSignatureNode::outputPost(OutputBuffer &OB, OutputFlags Flags) const {
|
2020-12-18 17:56:41 +01:00
|
|
|
if (FunctionClass & FC_StaticThisAdjust) {
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "`adjustor{" << ThisAdjust.StaticOffset << "}'";
|
2020-12-18 17:56:41 +01:00
|
|
|
} else if (FunctionClass & FC_VirtualThisAdjust) {
|
|
|
|
if (FunctionClass & FC_VirtualThisAdjustEx) {
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "`vtordispex{" << ThisAdjust.VBPtrOffset << ", "
|
2020-12-18 17:56:41 +01:00
|
|
|
<< ThisAdjust.VBOffsetOffset << ", " << ThisAdjust.VtordispOffset
|
|
|
|
<< ", " << ThisAdjust.StaticOffset << "}'";
|
|
|
|
} else {
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "`vtordisp{" << ThisAdjust.VtordispOffset << ", "
|
2020-12-18 17:56:41 +01:00
|
|
|
<< ThisAdjust.StaticOffset << "}'";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
FunctionSignatureNode::outputPost(OB, Flags);
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void PointerTypeNode::outputPre(OutputBuffer &OB, OutputFlags Flags) const {
|
2020-12-18 17:56:41 +01:00
|
|
|
if (Pointee->kind() == NodeKind::FunctionSignature) {
|
|
|
|
// If this is a pointer to a function, don't output the calling convention.
|
|
|
|
// It needs to go inside the parentheses.
|
|
|
|
const FunctionSignatureNode *Sig =
|
|
|
|
static_cast<const FunctionSignatureNode *>(Pointee);
|
2022-08-09 13:51:03 +02:00
|
|
|
Sig->outputPre(OB, OF_NoCallingConvention);
|
2020-12-18 17:56:41 +01:00
|
|
|
} else
|
2022-08-09 13:51:03 +02:00
|
|
|
Pointee->outputPre(OB, Flags);
|
2020-12-18 17:56:41 +01:00
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
outputSpaceIfNecessary(OB);
|
2020-12-18 17:56:41 +01:00
|
|
|
|
|
|
|
if (Quals & Q_Unaligned)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "__unaligned ";
|
2020-12-18 17:56:41 +01:00
|
|
|
|
|
|
|
if (Pointee->kind() == NodeKind::ArrayType) {
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "(";
|
2020-12-18 17:56:41 +01:00
|
|
|
} else if (Pointee->kind() == NodeKind::FunctionSignature) {
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "(";
|
2020-12-18 17:56:41 +01:00
|
|
|
const FunctionSignatureNode *Sig =
|
|
|
|
static_cast<const FunctionSignatureNode *>(Pointee);
|
2022-08-09 13:51:03 +02:00
|
|
|
outputCallingConvention(OB, Sig->CallConvention);
|
|
|
|
OB << " ";
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (ClassParent) {
|
2022-08-09 13:51:03 +02:00
|
|
|
ClassParent->output(OB, Flags);
|
|
|
|
OB << "::";
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
switch (Affinity) {
|
|
|
|
case PointerAffinity::Pointer:
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "*";
|
2020-12-18 17:56:41 +01:00
|
|
|
break;
|
|
|
|
case PointerAffinity::Reference:
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "&";
|
2020-12-18 17:56:41 +01:00
|
|
|
break;
|
|
|
|
case PointerAffinity::RValueReference:
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "&&";
|
2020-12-18 17:56:41 +01:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
assert(false);
|
|
|
|
}
|
2022-08-09 13:51:03 +02:00
|
|
|
outputQualifiers(OB, Quals, false, false);
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void PointerTypeNode::outputPost(OutputBuffer &OB, OutputFlags Flags) const {
|
2020-12-18 17:56:41 +01:00
|
|
|
if (Pointee->kind() == NodeKind::ArrayType ||
|
|
|
|
Pointee->kind() == NodeKind::FunctionSignature)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << ")";
|
2020-12-18 17:56:41 +01:00
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
Pointee->outputPost(OB, Flags);
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void TagTypeNode::outputPre(OutputBuffer &OB, OutputFlags Flags) const {
|
2020-12-18 17:56:41 +01:00
|
|
|
if (!(Flags & OF_NoTagSpecifier)) {
|
|
|
|
switch (Tag) {
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(TagKind, Class, "class");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(TagKind, Struct, "struct");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(TagKind, Union, "union");
|
|
|
|
OUTPUT_ENUM_CLASS_VALUE(TagKind, Enum, "enum");
|
|
|
|
}
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << " ";
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
2022-08-09 13:51:03 +02:00
|
|
|
QualifiedName->output(OB, Flags);
|
|
|
|
outputQualifiers(OB, Quals, true, false);
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void TagTypeNode::outputPost(OutputBuffer &OB, OutputFlags Flags) const {}
|
2020-12-18 17:56:41 +01:00
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void ArrayTypeNode::outputPre(OutputBuffer &OB, OutputFlags Flags) const {
|
|
|
|
ElementType->outputPre(OB, Flags);
|
|
|
|
outputQualifiers(OB, Quals, true, false);
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void ArrayTypeNode::outputOneDimension(OutputBuffer &OB, OutputFlags Flags,
|
2020-12-18 17:56:41 +01:00
|
|
|
Node *N) const {
|
|
|
|
assert(N->kind() == NodeKind::IntegerLiteral);
|
|
|
|
IntegerLiteralNode *ILN = static_cast<IntegerLiteralNode *>(N);
|
|
|
|
if (ILN->Value != 0)
|
2022-08-09 13:51:03 +02:00
|
|
|
ILN->output(OB, Flags);
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void ArrayTypeNode::outputDimensionsImpl(OutputBuffer &OB,
|
2020-12-18 17:56:41 +01:00
|
|
|
OutputFlags Flags) const {
|
|
|
|
if (Dimensions->Count == 0)
|
|
|
|
return;
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
outputOneDimension(OB, Flags, Dimensions->Nodes[0]);
|
2020-12-18 17:56:41 +01:00
|
|
|
for (size_t I = 1; I < Dimensions->Count; ++I) {
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "][";
|
|
|
|
outputOneDimension(OB, Flags, Dimensions->Nodes[I]);
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void ArrayTypeNode::outputPost(OutputBuffer &OB, OutputFlags Flags) const {
|
|
|
|
OB << "[";
|
|
|
|
outputDimensionsImpl(OB, Flags);
|
|
|
|
OB << "]";
|
2020-12-18 17:56:41 +01:00
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
ElementType->outputPost(OB, Flags);
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void SymbolNode::output(OutputBuffer &OB, OutputFlags Flags) const {
|
|
|
|
Name->output(OB, Flags);
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void FunctionSymbolNode::output(OutputBuffer &OB, OutputFlags Flags) const {
|
|
|
|
Signature->outputPre(OB, Flags);
|
|
|
|
outputSpaceIfNecessary(OB);
|
|
|
|
Name->output(OB, Flags);
|
|
|
|
Signature->outputPost(OB, Flags);
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void VariableSymbolNode::output(OutputBuffer &OB, OutputFlags Flags) const {
|
2020-12-18 17:56:41 +01:00
|
|
|
const char *AccessSpec = nullptr;
|
|
|
|
bool IsStatic = true;
|
|
|
|
switch (SC) {
|
|
|
|
case StorageClass::PrivateStatic:
|
|
|
|
AccessSpec = "private";
|
|
|
|
break;
|
|
|
|
case StorageClass::PublicStatic:
|
|
|
|
AccessSpec = "public";
|
|
|
|
break;
|
|
|
|
case StorageClass::ProtectedStatic:
|
|
|
|
AccessSpec = "protected";
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
IsStatic = false;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (!(Flags & OF_NoAccessSpecifier) && AccessSpec)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << AccessSpec << ": ";
|
2020-12-18 17:56:41 +01:00
|
|
|
if (!(Flags & OF_NoMemberType) && IsStatic)
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "static ";
|
2020-12-18 17:56:41 +01:00
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
if (!(Flags & OF_NoVariableType) && Type) {
|
|
|
|
Type->outputPre(OB, Flags);
|
|
|
|
outputSpaceIfNecessary(OB);
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
2022-08-09 13:51:03 +02:00
|
|
|
Name->output(OB, Flags);
|
|
|
|
if (!(Flags & OF_NoVariableType) && Type)
|
|
|
|
Type->outputPost(OB, Flags);
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void CustomTypeNode::outputPre(OutputBuffer &OB, OutputFlags Flags) const {
|
|
|
|
Identifier->output(OB, Flags);
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
2022-08-09 13:51:03 +02:00
|
|
|
void CustomTypeNode::outputPost(OutputBuffer &OB, OutputFlags Flags) const {}
|
2020-12-18 17:56:41 +01:00
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void QualifiedNameNode::output(OutputBuffer &OB, OutputFlags Flags) const {
|
|
|
|
Components->output(OB, Flags, "::");
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void RttiBaseClassDescriptorNode::output(OutputBuffer &OB,
|
2020-12-18 17:56:41 +01:00
|
|
|
OutputFlags Flags) const {
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "`RTTI Base Class Descriptor at (";
|
|
|
|
OB << NVOffset << ", " << VBPtrOffset << ", " << VBTableOffset << ", "
|
2020-12-18 17:56:41 +01:00
|
|
|
<< this->Flags;
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << ")'";
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void LocalStaticGuardVariableNode::output(OutputBuffer &OB,
|
2020-12-18 17:56:41 +01:00
|
|
|
OutputFlags Flags) const {
|
2022-08-09 13:51:03 +02:00
|
|
|
Name->output(OB, Flags);
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void VcallThunkIdentifierNode::output(OutputBuffer &OB,
|
2020-12-18 17:56:41 +01:00
|
|
|
OutputFlags Flags) const {
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "`vcall'{" << OffsetInVTable << ", {flat}}";
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:51:03 +02:00
|
|
|
void SpecialTableSymbolNode::output(OutputBuffer &OB, OutputFlags Flags) const {
|
|
|
|
outputQualifiers(OB, Quals, false, true);
|
|
|
|
Name->output(OB, Flags);
|
2020-12-18 17:56:41 +01:00
|
|
|
if (TargetName) {
|
2022-08-09 13:51:03 +02:00
|
|
|
OB << "{for `";
|
|
|
|
TargetName->output(OB, Flags);
|
|
|
|
OB << "'}";
|
2020-12-18 17:56:41 +01:00
|
|
|
}
|
|
|
|
}
|