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";
50 const char *
Kind = KindUndefined;
53 else if (getIsBlock())
55 else if (getIsCallSite())
57 else if (getIsCompileUnit())
58 Kind = KindCompileUnit;
59 else if (getIsEnumeration())
60 Kind = KindEnumeration;
61 else if (getIsInlinedFunction())
62 Kind = KindInlinedFunction;
63 else if (getIsNamespace())
65 else if (getIsTemplatePack())
66 Kind = KindTemplatePack;
69 else if (getIsTemplateAlias())
70 Kind = KindTemplateAlias;
71 else if (getIsClass())
73 else if (getIsFunction())
75 else if (getIsStructure())
77 else if (getIsUnion())
108 Children = std::make_unique<LVElements>();
116 else if (
Element->getIsScope())
118 else if (
Element->getIsSymbol())
129 assert(!
Line->getParent() &&
"Line already inserted");
131 Lines = std::make_unique<LVLines>();
135 Line->setParent(
this);
147 traverseParents(&LVScope::getHasLines, &LVScope::setHasLines);
155 Ranges = std::make_unique<LVLocations>();
170 Scopes = std::make_unique<LVScopes>();
183 if (
Scope->getIsGlobalReference())
184 traverseParents(&LVScope::getHasGlobals, &LVScope::setHasGlobals);
186 traverseParents(&LVScope::getHasLocals, &LVScope::setHasLocals);
189 traverseParents(&LVScope::getHasScopes, &LVScope::setHasScopes);
197 Symbols = std::make_unique<LVSymbols>();
210 if (
Symbol->getIsGlobalReference())
211 traverseParents(&LVScope::getHasGlobals, &LVScope::setHasGlobals);
213 traverseParents(&LVScope::getHasLocals, &LVScope::setHasLocals);
216 traverseParents(&LVScope::getHasSymbols, &LVScope::setHasSymbols);
222 assert(!
Type->getParent() &&
"Type already inserted");
224 Types = std::make_unique<LVTypes>();
229 Type->setParent(
this);
237 if (
Type->getIsGlobalReference())
238 traverseParents(&LVScope::getHasGlobals, &LVScope::setHasGlobals);
240 traverseParents(&LVScope::getHasLocals, &LVScope::setHasLocals);
243 traverseParents(&LVScope::getHasTypes, &LVScope::setHasTypes);
250 Location->setLowerAddress(LowerAddress);
251 Location->setUpperAddress(UpperAddress);
261 auto RemoveElement = [
Element, Predicate](
auto &Container) ->
bool {
262 auto Iter = std::remove_if(Container->begin(), Container->end(), Predicate);
263 if (Iter != Container->end()) {
264 Container->erase(Iter, Container->end());
274 return RemoveElement(
Lines);
280 return RemoveElement(
Types);
282 return RemoveElement(
Scopes);
296 if (!ReferenceSymbols)
300 References.
append(ReferenceSymbols->
begin(), ReferenceSymbols->
end());
314 if (
Symbol->getHasReferenceAbstract())
319 if (References.
size()) {
321 dbgs() <<
"Insert Missing Inlined Elements\n"
367 Line->updateLevel(
this, Moved);
380 if (getIsGlobalReference())
382 Element->setIsGlobalReference();
388 if (getIsResolvedName())
407 if (getIsArtificial())
462 if (getHasReference() && !
isNamed())
475 if (
Type->getIsTemplateParam()) {
480 return !Params.
empty();
485 if (getIsTemplateResolved())
487 setIsTemplateResolved();
490 if (
options().getAttributeEncoded()) {
493 std::string EncodedArgs;
504 if (getIsRoot() || getIsCompileUnit())
528 std::string BaseName;
530 if (getIsTemplateResolved())
531 Name.append(BaseName);
541 bool AddComma =
false;
553bool LVScope::resolvePrinting()
const {
557 if (
options().getPrintWarnings() && (getIsRoot() || getIsCompileUnit()))
563 if (
options().getSelectExecute()) {
564 return getIsRoot() || getIsCompileUnit() || getHasPattern();
567 bool Globals =
options().getAttributeGlobal();
568 bool Locals =
options().getAttributeLocal();
569 if ((Globals && Locals) || (!Globals && !Locals)) {
573 if ((Globals && !(getHasGlobals() || getIsGlobalReference())) ||
574 (Locals && !(getHasLocals() || !getIsGlobalReference())))
579 if (getIsFunction() && getIsArtificial() &&
580 !
options().getAttributeGenerated())
593 if (getIsSystem() && !
options().getAttributeSystem())
598 if (getIsCompileUnit()) {
601 std::string ScopeName(
getName());
602 if (std::error_code
EC =
611 bool DoPrint = (
options().getAttributeDiscarded()) ?
true : !getIsDiscarded();
619 getIsInCompare() ?
options().getReportExecute() : resolvePrinting();
625 DoPrint = DoPrint && (Print ||
options().getOutputSplit());
633 if ((getIsRoot() ||
options().getPrintAnyElement()) &&
634 options().getPrintFormatting() &&
657 if (
options().getPrintWarnings())
664 if (getIsCompileUnit()) {
665 if (
options().getPrintSummary())
675 if (getIsRoot() &&
options().getPrintWarnings()) {
690 std::stable_sort(Set->begin(), Set->end(), SortFunction);
692 Traverse(Parent->
Types, SortFunction);
693 Traverse(Parent->
Symbols, SortFunction);
694 Traverse(Parent->
Scopes, SortFunction);
696 Traverse(Parent->
Children, SortFunction);
700 Sort(
Scope, SortFunction);
704 Sort(
this, SortFunction);
714 if ((Parent->*GetFunction)())
716 (Parent->*SetFunction)();
723 if (
options().getReportParents()) {
728 if ((Parent->*GetFunction)())
730 (Parent->*SetFunction)();
736 auto Traverse = [&](
const auto *Set) {
738 for (
const auto &Entry : *Set)
739 (Entry->*SetFunction)();
742 (
Scope->*SetFunction)();
750 TraverseChildren(
Scope);
753 if (
options().getReportChildren())
754 TraverseChildren(
this);
779 if (getIsDiscarded())
786 if (!(
Location->*ValidLocation)() && RecordInvalid)
803 if (getIsDiscarded())
839 if (!Candidates.
empty()) {
840 dbgs() <<
"\n[LVScope::findIn]\n"
842 <<
"Offset = " << hexSquareString(getOffset()) <<
", "
843 <<
"Level = " << getLevel() <<
", "
844 <<
"Kind = " << formattedKind(kind()) <<
", "
845 <<
"Name = " << formattedName(getName()) <<
"\n";
846 for (const LVScope *Candidate : Candidates)
847 dbgs() <<
"Candidate: "
848 <<
"Offset = " << hexSquareString(Candidate->getOffset()) <<
", "
849 <<
"Level = " << Candidate->getLevel() <<
", "
850 <<
"Kind = " << formattedKind(Candidate->kind()) <<
", "
851 <<
"Name = " << formattedName(Candidate->getName()) <<
"\n";
855 if (!Candidates.
empty())
856 return (Candidates.
size() == 1)
857 ? (
equals(Candidates[0]) ? Candidates[0] :
nullptr)
868 (
options().getCompareSymbols() &&
875 auto SetCompareState = [&](
auto &Container) {
877 for (
auto *Entry : *Container)
878 Entry->setIsInCompare();
880 SetCompareState(
Types);
882 SetCompareState(
Lines);
900 bool TraverseChildren) {
901 if (!(References && Targets))
905 dbgs() <<
"\n[LVScope::markMissingParents]\n";
907 dbgs() <<
"References: "
909 <<
"Level = " <<
Reference->getLevel() <<
", "
913 dbgs() <<
"Targets : "
915 <<
"Level = " <<
Target->getLevel() <<
", "
926 dbgs() <<
"\nSearch Reference: "
933 dbgs() <<
"\nFound Target: "
937 if (TraverseChildren)
941 dbgs() <<
"Missing Reference: "
954 if (getIsLexicalBlock() &&
Scope->getIsLexicalBlock())
968 if (!References && !Targets)
970 if (References && Targets && References->
size() == Targets->
size()) {
993 if (
options().getPrintFormatting() &&
options().getAttributeRange() &&
1001 if (
options().getPrintFormatting() &&
options().getAttributeEncoded())
1007 if (getIncludeInPrint() &&
getReader().doPrintScope(
this)) {
1010 if (!(getIsRoot() || (getIsCompileUnit() &&
options().getSelectExecute())))
1020 if (!getIsBlock()) {
1022 if (!getIsAggregate())
1029 if (
Full && getIsBlock())
1066 if (getIsTemplateResolved())
1096 if (getIsArrayResolved())
1098 setIsArrayResolved();
1121 if (
Type->getIsSubrange()) {
1134 std::stringstream ArrayInfo;
1139 if (
Type->getIsSubrangeCount())
1141 ArrayInfo <<
"[" <<
Type->getCount() <<
"]";
1144 unsigned LowerBound;
1145 unsigned UpperBound;
1146 std::tie(LowerBound, UpperBound) =
Type->getBounds();
1153 ArrayInfo <<
"[" << LowerBound <<
".." << UpperBound <<
"]";
1155 ArrayInfo <<
"[" << UpperBound + 1 <<
"]";
1190 "CU [0x%08" PRIx64
"], Scope [0x%08" PRIx64
"], Range [0x%08" PRIx64
1191 ":0x%08" PRIx64
"], Size = %" PRId64
"\n",
1201 CUContributionSize =
Size;
1210 if (!
options().getSelectExecute())
1213 if (MatchedScopes.
size()) {
1216 &LVScope::setHasPattern);
1226 if (
options().getAttributeRange()) {
1229 bool RecordInvalid =
options().getWarningRanges();
1238 if (
options().getAttributeLocation()) {
1241 bool RecordInvalid =
options().getWarningLocations();
1259 LVAddressToLine *Map = SectionMappings.findMap(SectionIndex);
1260 if (!Map || Map->empty())
1262 LVAddressToLine::const_iterator Iter = Map->lower_bound(
Address);
1263 return (Iter != Map->end()) ? Iter->second :
nullptr;
1269 LVAddressToLine *Map = SectionMappings.findMap(SectionIndex);
1270 if (!Map || Map->empty())
1272 LVAddressToLine::const_iterator Iter = Map->upper_bound(
Address);
1273 if (Iter != Map->begin())
1274 Iter = std::prev(Iter);
1275 return Iter->second;
1283 LVLine *LowLine = lineLowerBound(
Location->getLowerAddress(), Parent);
1284 LVLine *HighLine = lineUpperBound(
Location->getUpperAddress(), Parent);
1289 if (Index <= 0 || Index > Filenames.size())
1316 if (
Line->getIncludeInPrint())
1320 if (
Scope->getIncludeInPrint())
1324 if (
Symbol->getIncludeInPrint())
1328 if (
Type->getIncludeInPrint())
1354 addItem<LVTagOffsetsMap, dwarf::Tag, LVOffset>(&DebugTags,
Target,
Offset);
1359 if (WarningOffsets.find(
Offset) == WarningOffsets.end())
1366 if (InvalidCoverages.find(
Offset) == InvalidCoverages.end())
1387 addItem<LVOffsetLinesMap, LVOffset, LVLine *>(&LinesZero,
Offset,
Line);
1391 if (!
options().getPrintFormatting())
1399 enum class Option { Directory, File };
1400 auto PrintNames = [&](Option Action) {
1401 StringRef Kind = Action == Option::Directory ?
"Directory" :
"File";
1402 std::set<std::string> UniqueNames;
1403 for (
size_t Index : Filenames) {
1407 size_t Pos =
Name.rfind(
'/');
1408 if (Pos != std::string::npos)
1409 Name = (Action == Option::File) ?
Name.substr(Pos + 1)
1410 :
Name.substr(0, Pos);
1412 UniqueNames.insert(std::string(
Name));
1414 for (
const std::string &
Name : UniqueNames)
1419 if (
options().getAttributeDirectories())
1420 PrintNames(Option::Directory);
1421 if (
options().getAttributeFiles())
1422 PrintNames(Option::File);
1423 if (
options().getAttributePublics()) {
1427 using OffsetSorted = std::map<LVAddress, LVPublicNames::const_iterator>;
1428 OffsetSorted SortedNames;
1429 for (LVPublicNames::const_iterator Iter = PublicNames.begin();
1430 Iter != PublicNames.end(); ++Iter)
1431 SortedNames.emplace(Iter->first->getOffset(), Iter);
1433 LVPublicNames::const_iterator Iter;
1434 for (OffsetSorted::reference Entry : SortedNames) {
1435 Iter = Entry.second;
1438 if (
options().getAttributeOffset()) {
1440 size_t Size = (*Iter).second.second;
1450 auto PrintHeader = [&](
const char *Header) {
OS <<
"\n" << Header <<
":\n"; };
1451 auto PrintFooter = [&](
auto &Set) {
1464 LVOffsetElementMap::const_iterator Iter = Map.find(
Offset);
1473 const char *Header) {
1474 PrintHeader(Header);
1475 for (LVOffsetLocationsMap::const_reference Entry : Map) {
1476 PrintElement(WarningOffsets, Entry.first);
1479 <<
Location->getIntervalInfo() <<
"\n";
1485 PrintHeader(
"Unsupported DWARF Tags");
1486 for (LVTagOffsetsMap::const_reference Entry : DebugTags) {
1487 OS <<
format(
"\n0x%02x", (
unsigned)Entry.first) <<
", "
1491 PrintOffset(Count,
Offset);
1494 PrintFooter(DebugTags);
1497 if (
options().getWarningCoverages()) {
1498 PrintHeader(
"Symbols Invalid Coverages");
1499 for (LVOffsetSymbolMap::const_reference Entry : InvalidCoverages) {
1507 PrintFooter(InvalidCoverages);
1510 if (
options().getWarningLines()) {
1511 PrintHeader(
"Lines Zero References");
1512 for (LVOffsetLinesMap::const_reference Entry : LinesZero) {
1513 PrintElement(WarningOffsets, Entry.first);
1516 PrintOffset(Count,
Line->getOffset());
1519 PrintFooter(LinesZero);
1522 if (
options().getWarningLocations())
1523 PrintInvalidLocations(InvalidLocations,
"Invalid Location Ranges");
1525 if (
options().getWarningRanges())
1526 PrintInvalidLocations(InvalidRanges,
"Invalid Code Ranges");
1529void LVScopeCompileUnit::printTotals(
raw_ostream &
OS)
const {
1530 OS <<
"\nTotals by lexical level:\n";
1533 Totals[
Index].second);
1537 LVSizesMap::const_iterator Iter = Sizes.find(
Scope);
1538 if (Iter != Sizes.end()) {
1540 assert(CUContributionSize &&
"Invalid CU contribution size.");
1544 rint((
float(
Size) / CUContributionSize) * 100.0 * 100.0) / 100.0;
1545 OS <<
format(
"%10" PRId64
" (%6.2f%%) : ",
Size, Percentage);
1550 if (Level > MaxSeenLevel)
1551 MaxSeenLevel =
Level;
1552 if (Level >= Totals.
size())
1553 Totals.
resize(2 * Level);
1555 Totals[
Level].second += Percentage;
1564 if (
options().getSelectExecute() &&
options().getReportAnyView()) {
1579 bool PrintScopes =
options().getPrintScopes();
1584 OS <<
"\nScope Sizes:\n";
1585 options().resetPrintFormatting();
1590 printScopeSize(
this,
OS);
1597 options().setPrintFormatting();
1609 const char *Header)
const {
1610 std::string Separator = std::string(29,
'-');
1611 auto PrintSeparator = [&]() {
OS << Separator <<
"\n"; };
1612 auto PrintHeadingRow = [&](
const char *
T,
const char *U,
const char *V) {
1615 auto PrintDataRow = [&](
const char *
T,
unsigned U,
unsigned V) {
1621 PrintHeadingRow(
"Element",
"Total", Header);
1623 PrintDataRow(
"Scopes", Allocated.
Scopes, Counter.
Scopes);
1625 PrintDataRow(
"Types", Allocated.
Types, Counter.
Types);
1626 PrintDataRow(
"Lines", Allocated.
Lines, Counter.
Lines);
1635 bool UseMatchedElements) {
1638 std::stable_sort(MatchedElements.
begin(), MatchedElements.
end(),
1644 if (
options().getPrintAnyElement()) {
1645 if (UseMatchedElements)
1649 if (UseMatchedElements) {
1664 if (
options().getPrintSummary()) {
1668 if (!
options().getReportList()) {
1670 if (!
Element->getIncludeInPrint())
1674 else if (
Element->getIsSymbol())
1676 else if (
Element->getIsScope())
1678 else if (
Element->getIsLine())
1690 if (
options().getPrintSizes()) {
1694 OS <<
"\nScope Sizes:\n";
1695 printScopeSize(
this,
OS);
1718 if (
options().getPrintFormatting() &&
options().getAttributeProducer())
1773 if (
options().getAttributeInserted() && getHasReferenceAbstract() &&
1774 !getAddedMissing()) {
1779 if (
Scope->getHasReferenceAbstract() && !
Scope->getAddedMissing())
1795 if (getHasReferenceSpecification()) {
1817 if (getIsTemplate())
1842 if (
options().getCompareLines() &&
1891 if (getIsTemplateResolved())
1907 if (getIsTemplate())
1916 if (getHasDiscriminator() &&
Scope->getHasDiscriminator())
1941 if (getIsMemberPointerResolved())
1943 setIsMemberPointerResolved();
1947 Name.append(
" (*)");
1952 bool AddComma =
false;
1954 if (
Symbol->getIsParameter()) {
1957 Type->resolveName();
2016 if (!
options().getAttributeAnyLocation())
2030 std::function<void(
LVScope * Parent)> TraverseScope = [&](
LVScope *Parent) {
2031 auto Traverse = [&](
const auto *Set) {
2033 for (
const auto &Entry : *Set)
2034 Entry->setInnerComponent();
2039 TraverseScope(
Scope);
2047 TraverseScope(
this);
2055 OS <<
"\nLogical View:\n";
2061 if (
options().getAttributeFormat())
2067 bool UseMatchedElements)
const {
2073 if (UseMatchedElements)
2074 options().resetPrintFormatting();
2084 if (std::error_code
EC =
2099 if (UseMatchedElements)
2100 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'.
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 transformScopedName()
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)
std::unique_ptr< LVLocations > Ranges
void addToChildren(LVElement *Element)
static void markMissingParents(const LVScopes *References, const LVScopes *Targets, bool TraverseChildren)
std::unique_ptr< LVSymbols > Symbols
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
std::unique_ptr< LVElements > Children
std::unique_ptr< LVTypes > Types
virtual bool equals(const LVScope *Scope) const
bool getTemplateParameterTypes(LVTypes &Params)
virtual StringRef getEncodedArgs() const
std::unique_ptr< LVLines > Lines
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
std::unique_ptr< LVScopes > Scopes
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)
std::map< LVOffset, LVElement * > LVOffsetElementMap
LVStringPool & getStringPool()
std::pair< LVLine *, LVLine * > LVLineRange
std::map< LVScopeKind, LVScopeGetFunction > LVScopeDispatch
std::string formattedKind(StringRef Kind)
std::map< LVOffset, LVLocations > LVOffsetLocationsMap
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()
std::string formattedName(StringRef Name)
void(LVObject::*)() LVObjectSetFunction
LVSortValue(*)(const LVObject *LHS, const LVObject *RHS) LVSortFunction
std::string formatAttributes(const StringRef First, Args... Others)
void(LVScope::*)() LVScopeSetFunction
LVCompare & getComparator()
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.