11using namespace llvm::itanium_demangle;
19 if (isGtInsideTemplateArgs())
22 if (
NameInfo.ArgumentsRange.first > 0)
32 if (isGtInsideTemplateArgs())
35 if (
NameInfo.ArgumentsRange.first == 0)
45 NameInfo.BasenameRange.second = getCurrentPosition();
52 NameInfo.ScopeRange.first = getCurrentPosition();
59 NameInfo.ScopeRange.second = getCurrentPosition();
66 NameInfo.ArgumentsRange.second = getCurrentPosition();
73 NameInfo.QualifiersRange.first = getCurrentPosition();
80 NameInfo.QualifiersRange.second = getCurrentPosition();
87 NameInfo.ArgumentsRange.first = getCurrentPosition();
92 if (
NameInfo.BasenameRange.second == 0)
93 NameInfo.BasenameRange.second = getCurrentPosition();
118 NameInfo.SuffixRange.first = getCurrentPosition();
130 switch (N.getKind()) {
131 case Node::KFunctionType:
134 case Node::KFunctionEncoding:
137 case Node::KNestedName:
140 case Node::KNameWithTemplateArgs:
144 OutputBuffer::printLeft(N);
148 NameInfo.SuffixRange.second = getCurrentPosition();
152 switch (N.getKind()) {
153 case Node::KFunctionType:
156 case Node::KFunctionEncoding:
160 OutputBuffer::printRight(N);
164 NameInfo.SuffixRange.second = getCurrentPosition();
169 OutputBuffer::printLeft(N);
174 OutputBuffer::printRight(N);
180 const Node *Ret = N.getReturnType();
183 if (!Ret->hasRHSComponent(*
this))
189 N.getName()->print(*
this);
197 N.getParams().printWithComma(*
this);
202 const Node *Ret = N.getReturnType();
209 auto CVQuals = N.getCVQuals();
210 auto RefQual = N.getRefQual();
211 auto *Attrs = N.getAttrs();
212 auto *Requires = N.getRequires();
214 if (CVQuals & QualConst)
216 if (CVQuals & QualVolatile)
217 *
this +=
" volatile";
218 if (CVQuals & QualRestrict)
219 *
this +=
" restrict";
220 if (RefQual == FrefQualLValue)
222 else if (RefQual == FrefQualRValue)
224 if (Attrs !=
nullptr)
226 if (Requires !=
nullptr) {
227 *
this +=
" requires ";
228 Requires->print(*
this);
236 N.Qual->print(*
this);
239 N.Name->print(*
this);
244 N.Name->print(*
this);
246 N.TemplateArgs->print(*
this);
A class that represents a running process on the host machine.
void updateScopeStart()
If this object shouldTrack, then update the beginning of the scope range to the current OB position.
bool canFinalize() const
Helper used in the finalize APIs.
void printRightImpl(const llvm::itanium_demangle::FunctionType &N)
void printLeftImpl(const llvm::itanium_demangle::FunctionType &N)
bool isPrintingTopLevelFunctionType() const
Returns true if we're not printing any nested function types, just a FunctionEncoding in the Itanium ...
llvm::itanium_demangle::ScopedOverride< unsigned > enterFunctionTypePrinting()
Called whenever we start printing a function type in the Itanium mangling scheme.
void updateBasenameEnd()
If this object shouldTrack, then update the end of the basename range to the current OB position.
unsigned FunctionPrintingDepth
Incremented each time we start printing a function type node in the Itanium mangling scheme (e....
void finalizeQualifiersEnd()
void printLeft(const llvm::itanium_demangle::Node &N) override
void finalizeArgumentEnd()
Helpers called to track beginning and end of the function arguments.
void updateScopeEnd()
If this object shouldTrack, then update the end of the scope range to the current OB position.
void printRight(const llvm::itanium_demangle::Node &N) override
bool shouldTrack() const
Returns true if the members of this object can be updated.
void finalizeQualifiersStart()
DemangledNameInfo NameInfo
Holds information about the demangled name that is being printed into this buffer.