25#define DEBUG_TYPE "Scope"
28const char *
const KindArray =
"Array";
29const char *
const KindBlock =
"Block";
30const char *
const KindCallSite =
"CallSite";
31const char *
const KindClass =
"Class";
32const char *
const KindCompileUnit =
"CompileUnit";
33const char *
const KindEnumeration =
"Enumeration";
34const char *
const KindFile =
"File";
35const char *
const KindFunction =
"Function";
36const char *
const KindInlinedFunction =
"InlinedFunction";
37const char *
const KindNamespace =
"Namespace";
38const char *
const KindStruct =
"Struct";
39const char *
const KindTemplateAlias =
"TemplateAlias";
40const char *
const KindTemplatePack =
"TemplatePack";
41const char *
const KindUndefined =
"Undefined";
42const char *
const KindUnion =
"Union";
59 const char *
Kind = KindUndefined;
62 else if (getIsBlock())
64 else if (getIsCallSite())
66 else if (getIsCompileUnit())
67 Kind = KindCompileUnit;
68 else if (getIsEnumeration())
69 Kind = KindEnumeration;
70 else if (getIsInlinedFunction())
71 Kind = KindInlinedFunction;
72 else if (getIsNamespace())
74 else if (getIsTemplatePack())
75 Kind = KindTemplatePack;
78 else if (getIsTemplateAlias())
79 Kind = KindTemplateAlias;
80 else if (getIsClass())
82 else if (getIsFunction())
84 else if (getIsStructure())
86 else if (getIsUnion())
125 else if (
Element->getIsScope())
127 else if (
Element->getIsSymbol())
138 assert(!
Line->getParent() &&
"Line already inserted");
144 Line->setParent(
this);
156 traverseParents(&LVScope::getHasLines, &LVScope::setHasLines);
192 if (
Scope->getIsGlobalReference())
193 traverseParents(&LVScope::getHasGlobals, &LVScope::setHasGlobals);
195 traverseParents(&LVScope::getHasLocals, &LVScope::setHasLocals);
198 traverseParents(&LVScope::getHasScopes, &LVScope::setHasScopes);
219 if (
Symbol->getIsGlobalReference())
220 traverseParents(&LVScope::getHasGlobals, &LVScope::setHasGlobals);
222 traverseParents(&LVScope::getHasLocals, &LVScope::setHasLocals);
225 traverseParents(&LVScope::getHasSymbols, &LVScope::setHasSymbols);
231 assert(!
Type->getParent() &&
"Type already inserted");
238 Type->setParent(
this);
246 if (
Type->getIsGlobalReference())
247 traverseParents(&LVScope::getHasGlobals, &LVScope::setHasGlobals);
249 traverseParents(&LVScope::getHasLocals, &LVScope::setHasLocals);
252 traverseParents(&LVScope::getHasTypes, &LVScope::setHasTypes);
259 Location->setLowerAddress(LowerAddress);
260 Location->setUpperAddress(UpperAddress);
270 auto RemoveElement = [
Element, Predicate](
auto &Container) ->
bool {
271 auto Iter = std::remove_if(Container->begin(), Container->end(), Predicate);
272 if (Iter != Container->end()) {
273 Container->erase(Iter, Container->end());
283 return RemoveElement(
Lines);
289 return RemoveElement(
Types);
291 return RemoveElement(
Scopes);
305 if (!ReferenceSymbols)
309 References.
append(ReferenceSymbols->
begin(), ReferenceSymbols->
end());
323 if (
Symbol->getHasReferenceAbstract())
328 if (References.
size()) {
330 dbgs() <<
"Insert Missing Inlined Elements\n"
376 Line->updateLevel(
this, Moved);
389 if (getIsGlobalReference())
391 Element->setIsGlobalReference();
397 if (getIsResolvedName())
416 if (getIsArtificial())
471 if (getHasReference() && !
isNamed())
484 if (
Type->getIsTemplateParam()) {
489 return !Params.
empty();
494 if (getIsTemplateResolved())
496 setIsTemplateResolved();
499 if (
options().getAttributeEncoded()) {
502 std::string EncodedArgs;
513 if (getIsRoot() || getIsCompileUnit())
537 std::string BaseName;
539 if (getIsTemplateResolved())
540 Name.append(BaseName);
550 bool AddComma =
false;
562bool LVScope::resolvePrinting()
const {
566 if (
options().getPrintWarnings() && (getIsRoot() || getIsCompileUnit()))
572 if (
options().getSelectExecute()) {
573 return getIsRoot() || getIsCompileUnit() || getHasPattern();
576 bool Globals =
options().getAttributeGlobal();
577 bool Locals =
options().getAttributeLocal();
578 if ((Globals && Locals) || (!Globals && !Locals)) {
582 if ((Globals && !(getHasGlobals() || getIsGlobalReference())) ||
583 (Locals && !(getHasLocals() || !getIsGlobalReference())))
588 if (getIsFunction() && getIsArtificial() &&
589 !
options().getAttributeGenerated())
603 if (getIsCompileUnit()) {
606 std::string ScopeName(
getName());
607 if (std::error_code EC =
616 bool DoPrint = (
options().getAttributeDiscarded()) ?
true : !getIsDiscarded();
624 getIsInCompare() ?
options().getReportExecute() : resolvePrinting();
630 DoPrint = DoPrint && (Print ||
options().getOutputSplit());
638 if ((getIsRoot() ||
options().getPrintAnyElement()) &&
639 options().getPrintFormatting() &&
662 if (
options().getPrintWarnings())
669 if (getIsCompileUnit()) {
670 if (
options().getPrintSummary())
680 if (getIsRoot() &&
options().getPrintWarnings()) {
695 std::stable_sort(Set->begin(), Set->end(), SortFunction);
697 Traverse(Parent->
Types, SortFunction);
698 Traverse(Parent->
Symbols, SortFunction);
699 Traverse(Parent->
Scopes, SortFunction);
701 Traverse(Parent->
Children, SortFunction);
705 Sort(
Scope, SortFunction);
709 Sort(
this, SortFunction);
719 if ((Parent->*GetFunction)())
721 (Parent->*SetFunction)();
728 if (
options().getReportParents()) {
733 if ((Parent->*GetFunction)())
735 (Parent->*SetFunction)();
741 auto Traverse = [&](
const auto *Set) {
743 for (
const auto &Entry : *Set)
744 (Entry->*SetFunction)();
747 (
Scope->*SetFunction)();
755 TraverseChildren(
Scope);
758 if (
options().getReportChildren())
759 TraverseChildren(
this);
784 if (getIsDiscarded())
791 if (!(
Location->*ValidLocation)() && RecordInvalid)
808 if (getIsDiscarded())
844 if (!Candidates.
empty()) {
845 dbgs() <<
"\n[LVScope::findIn]\n"
847 <<
"Offset = " << hexSquareString(getOffset()) <<
", "
848 <<
"Level = " << getLevel() <<
", "
849 <<
"Kind = " << formattedKind(kind()) <<
", "
850 <<
"Name = " << formattedName(getName()) <<
"\n";
851 for (const LVScope *Candidate : Candidates)
852 dbgs() <<
"Candidate: "
853 <<
"Offset = " << hexSquareString(Candidate->getOffset()) <<
", "
854 <<
"Level = " << Candidate->getLevel() <<
", "
855 <<
"Kind = " << formattedKind(Candidate->kind()) <<
", "
856 <<
"Name = " << formattedName(Candidate->getName()) <<
"\n";
860 if (!Candidates.
empty())
861 return (Candidates.
size() == 1)
862 ? (
equals(Candidates[0]) ? Candidates[0] :
nullptr)
873 (
options().getCompareSymbols() &&
880 auto SetCompareState = [&](
auto *Container) {
882 for (
auto *Entry : *Container)
883 Entry->setIsInCompare();
885 SetCompareState(
Types);
887 SetCompareState(
Lines);
905 bool TraverseChildren) {
906 if (!(References && Targets))
910 dbgs() <<
"\n[LVScope::markMissingParents]\n";
912 dbgs() <<
"References: "
914 <<
"Level = " <<
Reference->getLevel() <<
", "
918 dbgs() <<
"Targets : "
920 <<
"Level = " <<
Target->getLevel() <<
", "
931 dbgs() <<
"\nSearch Reference: "
938 dbgs() <<
"\nFound Target: "
942 if (TraverseChildren)
946 dbgs() <<
"Missing Reference: "
959 if (getIsLexicalBlock() &&
Scope->getIsLexicalBlock())
973 if (!References && !Targets)
975 if (References && Targets && References->
size() == Targets->
size()) {
998 if (
options().getPrintFormatting() &&
options().getAttributeRange() &&
1006 if (
options().getPrintFormatting() &&
options().getAttributeEncoded())
1012 if (getIncludeInPrint() &&
getReader().doPrintScope(
this)) {
1015 if (!(getIsRoot() || (getIsCompileUnit() &&
options().getSelectExecute())))
1025 if (!getIsBlock()) {
1027 if (!getIsAggregate())
1034 if (
Full && getIsBlock())
1071 if (getIsTemplateResolved())
1101 if (getIsArrayResolved())
1103 setIsArrayResolved();
1126 if (
Type->getIsSubrange()) {
1139 std::stringstream ArrayInfo;
1144 if (
Type->getIsSubrangeCount())
1146 ArrayInfo <<
"[" <<
Type->getCount() <<
"]";
1149 unsigned LowerBound;
1150 unsigned UpperBound;
1151 std::tie(LowerBound, UpperBound) =
Type->getBounds();
1158 ArrayInfo <<
"[" << LowerBound <<
".." << UpperBound <<
"]";
1160 ArrayInfo <<
"[" << UpperBound + 1 <<
"]";
1195 "CU [0x%08" PRIx64
"], Scope [0x%08" PRIx64
"], Range [0x%08" PRIx64
1196 ":0x%08" PRIx64
"], Size = %" PRId64
"\n",
1206 CUContributionSize =
Size;
1215 if (!
options().getSelectExecute())
1218 if (MatchedScopes.
size()) {
1221 &LVScope::setHasPattern);
1231 if (
options().getAttributeRange()) {
1234 bool RecordInvalid =
options().getWarningRanges();
1243 if (
options().getAttributeLocation()) {
1246 bool RecordInvalid =
options().getWarningLocations();
1264 LVAddressToLine *Map = SectionMappings.findMap(SectionIndex);
1265 if (!Map || Map->empty())
1267 LVAddressToLine::const_iterator Iter = Map->lower_bound(
Address);
1268 return (Iter != Map->end()) ? Iter->second :
nullptr;
1274 LVAddressToLine *Map = SectionMappings.findMap(SectionIndex);
1275 if (!Map || Map->empty())
1277 LVAddressToLine::const_iterator Iter = Map->upper_bound(
Address);
1278 if (Iter != Map->begin())
1279 Iter = std::prev(Iter);
1280 return Iter->second;
1288 LVLine *LowLine = lineLowerBound(
Location->getLowerAddress(), Parent);
1289 LVLine *HighLine = lineUpperBound(
Location->getUpperAddress(), Parent);
1294 if (Index <= 0 || Index > Filenames.size())
1321 if (
Line->getIncludeInPrint())
1325 if (
Scope->getIncludeInPrint())
1329 if (
Symbol->getIncludeInPrint())
1333 if (
Type->getIncludeInPrint())
1359 addItem<LVTagOffsetsMap, LVOffsetList, dwarf::Tag, LVOffset>(&DebugTags,
1365 if (WarningOffsets.find(
Offset) == WarningOffsets.end())
1372 if (InvalidCoverages.find(
Offset) == InvalidCoverages.end())
1393 addItem<LVOffsetLinesMap, LVLines, LVOffset, LVLine *>(&LinesZero,
Offset,
1398 if (!
options().getPrintFormatting())
1406 enum class Option { Directory, File };
1407 auto PrintNames = [&](Option Action) {
1408 StringRef Kind = Action == Option::Directory ?
"Directory" :
"File";
1409 std::set<std::string> UniqueNames;
1410 for (
size_t Index : Filenames) {
1414 size_t Pos =
Name.rfind(
'/');
1415 if (Pos != std::string::npos)
1416 Name = (Action == Option::File) ?
Name.substr(Pos + 1)
1417 :
Name.substr(0, Pos);
1419 UniqueNames.insert(std::string(
Name));
1421 for (
const std::string &
Name : UniqueNames)
1426 if (
options().getAttributeDirectories())
1427 PrintNames(Option::Directory);
1428 if (
options().getAttributeFiles())
1429 PrintNames(Option::File);
1430 if (
options().getAttributePublics()) {
1434 using OffsetSorted = std::map<LVAddress, LVPublicNames::const_iterator>;
1435 OffsetSorted SortedNames;
1436 for (LVPublicNames::const_iterator Iter = PublicNames.begin();
1437 Iter != PublicNames.end(); ++Iter)
1438 SortedNames.emplace(Iter->first->getOffset(), Iter);
1440 LVPublicNames::const_iterator Iter;
1441 for (OffsetSorted::reference Entry : SortedNames) {
1442 Iter = Entry.second;
1445 if (
options().getAttributeOffset()) {
1447 size_t Size = (*Iter).second.second;
1457 auto PrintHeader = [&](
const char *Header) { OS <<
"\n" << Header <<
":\n"; };
1458 auto PrintFooter = [&](
auto &Set) {
1471 LVOffsetElementMap::const_iterator Iter = Map.find(
Offset);
1480 const char *Header) {
1481 PrintHeader(Header);
1482 for (LVOffsetLocationsMap::const_reference Entry : Map) {
1483 PrintElement(WarningOffsets, Entry.first);
1486 <<
Location->getIntervalInfo() <<
"\n";
1492 PrintHeader(
"Unsupported DWARF Tags");
1493 for (LVTagOffsetsMap::const_reference Entry : DebugTags) {
1494 OS <<
format(
"\n0x%02x", (
unsigned)Entry.first) <<
", "
1498 PrintOffset(Count,
Offset);
1501 PrintFooter(DebugTags);
1504 if (
options().getWarningCoverages()) {
1505 PrintHeader(
"Symbols Invalid Coverages");
1506 for (LVOffsetSymbolMap::const_reference Entry : InvalidCoverages) {
1514 PrintFooter(InvalidCoverages);
1517 if (
options().getWarningLines()) {
1518 PrintHeader(
"Lines Zero References");
1519 for (LVOffsetLinesMap::const_reference Entry : LinesZero) {
1520 PrintElement(WarningOffsets, Entry.first);
1523 PrintOffset(Count,
Line->getOffset());
1526 PrintFooter(LinesZero);
1529 if (
options().getWarningLocations())
1530 PrintInvalidLocations(InvalidLocations,
"Invalid Location Ranges");
1532 if (
options().getWarningRanges())
1533 PrintInvalidLocations(InvalidRanges,
"Invalid Code Ranges");
1536void LVScopeCompileUnit::printTotals(
raw_ostream &OS)
const {
1537 OS <<
"\nTotals by lexical level:\n";
1540 Totals[
Index].second);
1544 LVSizesMap::const_iterator Iter = Sizes.find(
Scope);
1545 if (Iter != Sizes.end()) {
1547 assert(CUContributionSize &&
"Invalid CU contribution size.");
1551 rint((
float(
Size) / CUContributionSize) * 100.0 * 100.0) / 100.0;
1552 OS <<
format(
"%10" PRId64
" (%6.2f%%) : ",
Size, Percentage);
1557 if (
Level > MaxSeenLevel)
1558 MaxSeenLevel =
Level;
1562 Totals[
Level].second += Percentage;
1571 if (
options().getSelectExecute() &&
options().getReportAnyView()) {
1574 printScopeSize(
Scope, OS);
1580 printScopeSize(
Scope, OS);
1586 bool PrintScopes =
options().getPrintScopes();
1591 OS <<
"\nScope Sizes:\n";
1592 options().resetPrintFormatting();
1597 printScopeSize(
this, OS);
1604 options().setPrintFormatting();
1616 const char *Header)
const {
1617 std::string Separator = std::string(29,
'-');
1618 auto PrintSeparator = [&]() { OS << Separator <<
"\n"; };
1619 auto PrintHeadingRow = [&](
const char *
T,
const char *U,
const char *V) {
1620 OS <<
format(
"%-9s%9s %9s\n",
T, U, V);
1622 auto PrintDataRow = [&](
const char *
T,
unsigned U,
unsigned V) {
1623 OS <<
format(
"%-9s%9d %9d\n",
T, U, V);
1628 PrintHeadingRow(
"Element",
"Total", Header);
1630 PrintDataRow(
"Scopes", Allocated.
Scopes, Counter.
Scopes);
1632 PrintDataRow(
"Types", Allocated.
Types, Counter.
Types);
1633 PrintDataRow(
"Lines", Allocated.
Lines, Counter.
Lines);
1642 bool UseMatchedElements) {
1645 std::stable_sort(MatchedElements.
begin(), MatchedElements.
end(),
1651 if (
options().getPrintAnyElement()) {
1652 if (UseMatchedElements)
1656 if (UseMatchedElements) {
1671 if (
options().getPrintSummary()) {
1675 if (!
options().getReportList()) {
1677 if (!
Element->getIncludeInPrint())
1681 else if (
Element->getIsSymbol())
1683 else if (
Element->getIsScope())
1685 else if (
Element->getIsLine())
1697 if (
options().getPrintSizes()) {
1701 OS <<
"\nScope Sizes:\n";
1702 printScopeSize(
this, OS);
1725 if (
options().getPrintFormatting() &&
options().getAttributeProducer())
1780 if (
options().getAttributeInserted() && getHasReferenceAbstract() &&
1781 !getAddedMissing()) {
1786 if (
Scope->getHasReferenceAbstract() && !
Scope->getAddedMissing())
1800 if (getHasReferenceSpecification()) {
1822 if (getIsTemplate())
1847 if (
options().getCompareLines() &&
1896 if (getIsTemplateResolved())
1912 if (getIsTemplate())
1921 if (getHasDiscriminator() &&
Scope->getHasDiscriminator())
1946 if (getIsMemberPointerResolved())
1948 setIsMemberPointerResolved();
1952 Name.append(
" (*)");
1957 bool AddComma =
false;
1959 if (
Symbol->getIsParameter()) {
1962 Type->resolveName();
2021 if (!
options().getAttributeAnyLocation())
2038 OS <<
"\nLogical View:\n";
2044 if (
options().getAttributeFormat())
2050 bool UseMatchedElements)
const {
2056 if (UseMatchedElements)
2057 options().resetPrintFormatting();
2067 if (std::error_code EC =
2082 if (UseMatchedElements)
2083 options().setPrintFormatting();
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Stores all information relating to a compile unit, be it in its original instance in the object file ...
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Pass interface - Implemented by all 'passes'.
iterator erase(const_iterator CI)
void append(ItTy in_start, ItTy in_end)
Add the specified range to the end of the SmallVector.
void push_back(const T &Elt)
StringRef - Represent a constant reference to a string, i.e.
std::string str() const
str - Get the contents as an std::string.
Target - Wrapper for Target specific information.
const char * getName() const
getName - Get the target name.
The instances of the Type class are immutable: once they are created, they are never changed.
void printItem(LVElement *Element, LVComparePass Pass)
void push(LVScope *Scope)
size_t getNameIndex() const
std::string discriminatorAsString() const
StringRef getQualifiedName() const
void resolveFullname(LVElement *BaseType, StringRef Name=emptyString())
virtual size_t getCallFilenameIndex() const
virtual void updateLevel(LVScope *Parent, bool Moved=false)
virtual void resolveName()
StringRef virtualityString(uint32_t Virtuality=dwarf::DW_VIRTUALITY_none) const
uint32_t getInlineCode() const
StringRef typeAsString() const
virtual uint32_t getDiscriminator() const
StringRef externalString() const
virtual StringRef getLinkageName() const
void setName(StringRef ElementName) override
StringRef getName() const override
LVElement * getType() const
bool referenceMatch(const LVElement *Element) const
virtual uint32_t getCallLineNumber() const
void setFile(LVElement *Reference=nullptr)
void setType(LVElement *Element=nullptr)
StringRef getTypeName() const
void printLinkageName(raw_ostream &OS, bool Full, LVElement *Parent, LVScope *Scope) const
StringRef getTypeQualifiedName() const
virtual void report(LVComparePass Pass)
StringRef accessibilityString(uint32_t Access=dwarf::DW_ACCESS_private) const
bool equals(const LVElement *Element) const
StringRef inlineCodeString(uint32_t Code) const
size_t getFilenameIndex() const
std::string typeOffsetAsString() const
virtual size_t getLinkageNameIndex() const
bool isNamed() const override
void printReference(raw_ostream &OS, bool Full, LVElement *Parent) const
static void markMissingParents(const LVLines *References, const LVLines *Targets)
virtual bool equals(const LVLine *Line) const
virtual Error doPrint(bool Split, bool Match, bool Print, raw_ostream &OS, bool Full=true) const
virtual const char * kind() const
LVScope * getParentScope() const
std::string indentAsString() const
virtual void print(raw_ostream &OS, bool Full=true) const
void setLevel(LVLevel Level)
void printAttributes(raw_ostream &OS, bool Full=true) const
virtual std::string lineNumberAsString(bool ShowZero=false) const
void setParent(LVScope *Scope)
void setOffset(LVOffset DieOffset)
LVOffset getOffset() const
LVElement * getParent() const
size_t indentationSize() const
void resetFilenameIndex()
void resolvePatternMatch(LVLine *Line)
void addEntry(LVScope *Scope, LVAddress LowerAddress, LVAddress UpperAddress)
void notifyAddedElement(LVLine *Line)
raw_ostream & outputStream()
virtual bool isSystemEntry(LVElement *Element, StringRef Name={}) const
virtual LVSectionIndex getSectionIndex(LVScope *Scope)
void setCompileUnit(LVScope *Scope)
bool doPrintScope(const LVScope *Scope) const
virtual void printRecords(raw_ostream &OS) const
void printExtra(raw_ostream &OS, bool Full=true) const override
LVScope * getReference() const override
bool equals(const LVScope *Scope) const override
LVScope * findEqualScope(const LVScopes *Scopes) const override
bool equals(const LVScope *Scope) const override
void printExtra(raw_ostream &OS, bool Full=true) const override
void resolveExtra() override
bool equals(const LVScope *Scope) const override
void printExtra(raw_ostream &OS, bool Full=true) const override
void propagatePatternMatch()
void addDebugTag(dwarf::Tag Target, LVOffset Offset)
void printSummary(raw_ostream &OS) const override
void addedElement(LVLine *Line)
void printExtra(raw_ostream &OS, bool Full=true) const override
void printMatchedElements(raw_ostream &OS, bool UseMatchedElements) override
LVLineRange lineRange(LVLocation *Location) const
void addMapping(LVLine *Line, LVSectionIndex SectionIndex)
void addInvalidLocation(LVLocation *Location)
void incrementPrintedScopes()
void increment(LVLine *Line)
void addLineZero(LVLine *Line)
void addInvalidOffset(LVOffset Offset, LVElement *Element)
void addInvalidCoverage(LVSymbol *Symbol)
void addSize(LVScope *Scope, LVOffset Lower, LVOffset Upper)
void processRangeLocationCoverage(LVValidLocation ValidLocation=&LVLocation::validateRanges)
void incrementPrintedLines()
StringRef getFilename(size_t Index) const
void print(raw_ostream &OS, bool Full=true) const override
bool equals(const LVScope *Scope) const override
void printSizes(raw_ostream &OS) const override
void addInvalidRange(LVLocation *Location)
void printLocalNames(raw_ostream &OS, bool Full=true) const
StringRef getProducer() const override
void incrementPrintedSymbols()
void incrementPrintedTypes()
void printWarnings(raw_ostream &OS, bool Full=true) const override
void printExtra(raw_ostream &OS, bool Full=true) const override
bool equals(const LVScope *Scope) const override
LVScope * findEqualScope(const LVScopes *Scopes) const override
uint32_t getCallLineNumber() const override
void resolveExtra() override
bool equals(const LVScope *Scope) const override
uint32_t getDiscriminator() const override
size_t getCallFilenameIndex() const override
void printExtra(raw_ostream &OS, bool Full=true) const override
void resolveExtra() override
void setName(StringRef ObjectName) override
LVScope * getReference() const override
LVScope * findEqualScope(const LVScopes *Scopes) const override
size_t getLinkageNameIndex() const override
void printExtra(raw_ostream &OS, bool Full=true) const override
bool equals(const LVScope *Scope) const override
void resolveReferences() override
void resolveExtra() override
void printExtra(raw_ostream &OS, bool Full=true) const override
bool equals(const LVScope *Scope) const override
LVScope * findEqualScope(const LVScopes *Scopes) const override
LVScope * getReference() const override
void processRangeInformation()
void printExtra(raw_ostream &OS, bool Full=true) const override
StringRef getFileFormatName() const
Error doPrintMatches(bool Split, raw_ostream &OS, bool UseMatchedElements) const
void print(raw_ostream &OS, bool Full=true) const override
bool equals(const LVScope *Scope) const override
void printExtra(raw_ostream &OS, bool Full=true) const override
bool equals(const LVScope *Scope) const override
virtual LVScope * getReference() const
void addElement(LVElement *Element)
void traverseParentsAndChildren(LVObjectGetFunction GetFunction, LVObjectSetFunction SetFunction)
const LVLines * getLines() const
virtual void printSummary(raw_ostream &OS) const
StringRef resolveReferencesChain()
void printExtra(raw_ostream &OS, bool Full=true) const override
void report(LVComparePass Pass) override
const char * kind() const override
virtual LVScope * findEqualScope(const LVScopes *Scopes) const
const LVScopes * getScopes() const
void print(raw_ostream &OS, bool Full=true) const override
void resolveName() override
void printActiveRanges(raw_ostream &OS, bool Full=true) const
size_t scopeCount() const
const LVSymbols * getSymbols() const
virtual void printMatchedElements(raw_ostream &OS, bool UseMatchedElements)
virtual void setEncodedArgs(StringRef EncodedArgs)
void printEncodedArgs(raw_ostream &OS, bool Full) const
void updateLevel(LVScope *Parent, bool Moved) override
LVScope * outermostParent(LVAddress Address)
void addToChildren(LVElement *Element)
static void markMissingParents(const LVScopes *References, const LVScopes *Targets, bool TraverseChildren)
const LVTypes * getTypes() const
void encodeTemplateArguments(std::string &Name) const
void addObject(LVLocation *Location)
const LVElements * getChildren() const
virtual void printSizes(raw_ostream &OS) const
virtual bool equals(const LVScope *Scope) const
bool getTemplateParameterTypes(LVTypes &Params)
virtual StringRef getEncodedArgs() const
void getLocations(LVLocations &LocationList, LVValidLocation ValidLocation, bool RecordInvalid=false)
Error doPrint(bool Split, bool Match, bool Print, raw_ostream &OS, bool Full=true) const override
virtual bool equalNumberOfChildren(const LVScope *Scope) const
void addMissingElements(LVScope *Reference)
virtual void printWarnings(raw_ostream &OS, bool Full=true) const
void resolveReferences() override
const LVLocations * getRanges() const
size_t symbolCount() const
bool removeElement(LVElement *Element) override
StringRef getString(size_t Index) const
void getLocations(LVLocations &LocationList, LVValidLocation ValidLocation, bool RecordInvalid=false)
static void markMissingParents(const LVSymbols *References, const LVSymbols *Targets)
float getCoveragePercentage() const
void setReference(LVSymbol *Symbol) override
const char * kind() const override
static bool parametersMatch(const LVSymbols *References, const LVSymbols *Targets)
LVSymbol * getReference() const
virtual bool equals(const LVType *Type) const
static bool parametersMatch(const LVTypes *References, const LVTypes *Targets)
static void markMissingParents(const LVTypes *References, const LVTypes *Targets)
This class implements an extremely fast bulk output stream that can only output to a stream.
StringRef TagString(unsigned Tag)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
std::string hexString(uint64_t Value, size_t Width=HEX_WIDTH)
std::string formattedNames(StringRef Name1, StringRef Name2)
LVAutoSmallVector< LVLine * > LVAutoLines
std::map< LVOffset, LVElement * > LVOffsetElementMap
LVStringPool & getStringPool()
std::pair< LVLine *, LVLine * > LVLineRange
std::map< LVScopeKind, LVScopeGetFunction > LVScopeDispatch
std::string formattedKind(StringRef Kind)
LVScopeCompileUnit * getReaderCompileUnit()
LVSortValue compareRange(const LVObject *LHS, const LVObject *RHS)
bool(LVObject::*)() const LVObjectGetFunction
std::string hexSquareString(uint64_t Value)
bool(LVScope::*)() const LVScopeGetFunction
bool(LVLocation::*)() LVValidLocation
LVSplitContext & getReaderSplitContext()
LVSortFunction getSortFunction()
LVAutoSmallVector< LVScope * > LVAutoScopes
LVAutoSmallVector< LVType * > LVAutoTypes
std::string formattedName(StringRef Name)
void(LVObject::*)() LVObjectSetFunction
std::map< LVOffset, LVLocations * > LVOffsetLocationsMap
SmallVector< LVElement *, 8 > LVElements
LVAutoSmallVector< LVLocation * > LVAutoLocations
LVSortValue(*)(const LVObject *LHS, const LVObject *RHS) LVSortFunction
std::string formatAttributes(const StringRef First, Args... Others)
void(LVScope::*)() LVScopeSetFunction
LVCompare & getComparator()
LVAutoSmallVector< LVSymbol * > LVAutoSymbols
This is an optimization pass for GlobalISel generic memory operations.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.