40#define DEBUG_TYPE "CodeViewUtilities"
43namespace logicalview {
74#define CV_TYPE(enum, val) {#enum, enum},
75#include "llvm/DebugInfo/CodeView/CodeViewTypes.def"
86 auto GetName = [&](
auto Record) {
95 if (RK == TypeRecordKind::Class || RK == TypeRecordKind::Struct)
97 else if (RK == TypeRecordKind::Union)
99 else if (RK == TypeRecordKind::Enum)
109#define DEBUG_TYPE "CodeViewDataVisitor"
112namespace logicalview {
123 using RecordEntry = std::pair<TypeLeafKind, LVElement *>;
124 using RecordTable = std::map<TypeIndex, RecordEntry>;
125 RecordTable RecordFromTypes;
126 RecordTable RecordFromIds;
128 using NameTable = std::map<StringRef, TypeIndex>;
129 NameTable NameFromTypes;
130 NameTable NameFromIds;
133 LVTypeRecords(
LVShared *Shared) : Shared(Shared) {}
142class LVForwardReferences {
144 using ForwardEntry = std::pair<TypeIndex, TypeIndex>;
145 using ForwardTypeNames = std::map<StringRef, ForwardEntry>;
146 ForwardTypeNames ForwardTypesNames;
149 using ForwardType = std::map<TypeIndex, TypeIndex>;
150 ForwardType ForwardTypes;
154 ForwardTypes.emplace(TIForward, TIReference);
162 It->second.first = TIForward;
163 add(TIForward, It->second.second);
173 It->second.second = TIReference;
174 add(It->second.first, TIReference);
179 LVForwardReferences() =
default;
185 (IsForwardRef) ? add(
Name, TI) : update(
Name, TI);
189 auto It = ForwardTypes.find(TIForward);
194 auto It = ForwardTypesNames.find(
Name);
195 return It != ForwardTypesNames.end() ? It->second.second
208class LVNamespaceDeduction {
211 using Names = std::map<StringRef, LVScope *>;
212 Names NamespaceNames;
214 using LookupSet = std::set<StringRef>;
215 LookupSet DeducedScopes;
216 LookupSet UnresolvedScopes;
217 LookupSet IdentifiedNamespaces;
220 if (NamespaceNames.find(
Name) == NamespaceNames.end())
221 NamespaceNames.emplace(
Name, Namespace);
225 LVNamespaceDeduction(
LVShared *Shared) : Shared(Shared) {}
234 auto It = NamespaceNames.find(
Name);
235 LVScope *Namespace = It != NamespaceNames.end() ? It->second :
nullptr;
243 if (Components.empty())
246 LVStringRefs::size_type FirstNamespace = 0;
247 LVStringRefs::size_type FirstNonNamespace;
248 for (LVStringRefs::size_type Index = 0; Index < Components.size();
250 FirstNonNamespace = Index;
251 LookupSet::iterator Iter = IdentifiedNamespaces.find(Components[Index]);
252 if (Iter == IdentifiedNamespaces.end())
256 return std::make_tuple(FirstNamespace, FirstNonNamespace);
261class LVStringRecords {
262 using StringEntry = std::tuple<uint32_t, std::string, LVScopeCompileUnit *>;
263 using StringIds = std::map<TypeIndex, StringEntry>;
267 LVStringRecords() =
default;
271 auto [It,
Inserted] = Strings.try_emplace(TI);
273 It->second = std::make_tuple(++Index, std::string(
String),
nullptr);
277 StringIds::iterator Iter = Strings.find(TI);
278 return Iter != Strings.end() ? std::get<1>(Iter->second) :
StringRef{};
282 StringIds::iterator Iter = Strings.find(TI);
283 return Iter != Strings.end() ? std::get<0>(Iter->second) : 0;
326 (StreamIdx ==
StreamTPI) ? RecordFromTypes : RecordFromIds;
327 Target.emplace(std::piecewise_construct, std::forward_as_tuple(TI),
328 std::forward_as_tuple(
Kind, Element));
332 NameTable &
Target = (StreamIdx ==
StreamTPI) ? NameFromTypes : NameFromIds;
338 (StreamIdx ==
StreamTPI) ? RecordFromTypes : RecordFromIds;
341 RecordTable::iterator Iter =
Target.find(TI);
342 if (Iter !=
Target.end()) {
343 Element = Iter->second.second;
344 if (Element || !Create)
351 Element->setOffsetFromTypeIndex();
352 Target[TI].second = Element;
359 NameTable &
Target = (StreamIdx ==
StreamTPI) ? NameFromTypes : NameFromIds;
364void LVStringRecords::addFilenames() {
365 for (StringIds::const_reference Entry : Strings) {
374 for (StringIds::reference Entry : Strings)
375 if (!std::get<2>(
Entry.second))
383 DeducedScopes.insert(InnerComponent);
384 if (OuterComponent.
size())
385 UnresolvedScopes.insert(OuterComponent);
388void LVNamespaceDeduction::init() {
395 for (
const StringRef &Unresolved : UnresolvedScopes) {
397 for (
const StringRef &Component : Components) {
398 LookupSet::iterator Iter = DeducedScopes.find(Component);
399 if (Iter == DeducedScopes.end())
400 IdentifiedNamespaces.insert(Component);
405 auto Print = [&](LookupSet &Container,
const char *Title) {
406 auto Header = [&]() {
416 Print(DeducedScopes,
"Deducted Scopes");
417 Print(UnresolvedScopes,
"Unresolved Scopes");
418 Print(IdentifiedNamespaces,
"Namespaces");
424 for (
const StringRef &Component : Components)
428 if (Components.empty())
434 for (
const StringRef &Component : Components) {
436 Namespace =
find(Component);
440 Namespace = Shared->
Reader->createScopeNamespace();
441 Namespace->
setTag(dwarf::DW_TAG_namespace);
445 add(Component, Namespace);
456 LookupSet::iterator Iter = IdentifiedNamespaces.find(Component);
457 return Iter == IdentifiedNamespaces.end();
461 {
dbgs() <<
formatv(
"ScopedName: '{0}'\n", ScopedName.
str().c_str()); });
463 return get(Components);
467#define DEBUG_TYPE "CodeViewTypeVisitor"
488 if (
options().getInternalTag())
493 CurrentTypeIndex = TI;
532 printTypeIndex(
"ArgType", Arg,
StreamIPI);
542 TI = Args.getArgs()[BuildInfoRecord::BuildInfoArg::CurrentDirectory];
548 TI = Args.getArgs()[BuildInfoRecord::BuildInfoArg::SourceFile];
560 printTypeIndex(
"TypeIndex", CurrentTypeIndex,
StreamTPI);
578 printTypeIndex(
"TypeIndex", CurrentTypeIndex,
StreamTPI);
579 printTypeIndex(
"FieldListType",
Enum.getFieldList(),
StreamTPI);
591 printTypeIndex(
"TypeIndex", CurrentTypeIndex,
StreamTPI);
592 printTypeIndex(
"Type", Func.getFunctionType(),
StreamTPI);
593 printTypeIndex(
"Parent", Func.getParentScope(),
StreamTPI);
605 printTypeIndex(
"TypeIndex", CurrentTypeIndex,
StreamTPI);
632 printTypeIndex(
"SourceFile",
Line.getSourceFile(),
StreamIPI);
662#define DEBUG_TYPE "CodeViewSymbolVisitor"
671 Reader->printRelocatedField(
Label, CoffSection, RelocOffset,
Offset,
692 return Reader->CVStringTable;
695void LVSymbolVisitor::printLocalVariableAddrRange(
697 DictScope S(W,
"LocalVariableAddrRange");
705void LVSymbolVisitor::printLocalVariableAddrGap(
709 W.
printHex(
"GapStartOffset", Gap.GapStartOffset);
729 if (
options().getInternalTag())
743 IsCompileUnit =
false;
791 if (
options().getGeneralCollectRanges()) {
797 Scope->addObject(LowPC, HighPC);
808 printTypeIndex(
"Type",
Local.Type);
814 Symbol->setName(
Local.Name);
822 Symbol->resetIsVariable();
824 if (
Local.Name ==
"this") {
825 Symbol->setIsParameter();
826 Symbol->setIsArtificial();
829 bool(
Local.Offset > 0) ? Symbol->setIsParameter()
830 : Symbol->setIsVariable();
834 if (Symbol->getIsParameter())
835 Symbol->setTag(dwarf::DW_TAG_formal_parameter);
838 if (Element && Element->getIsScoped()) {
840 LVScope *Parent = Symbol->getFunctionParent();
853 Symbol->setType(Element);
863 printTypeIndex(
"Type",
Local.Type);
869 Symbol->setName(
Local.Name);
872 Symbol->resetIsVariable();
875 if (
Local.Name ==
"this") {
876 Symbol->setIsArtificial();
877 Symbol->setIsParameter();
880 determineSymbolKind(Symbol,
Local.Register);
884 if (Symbol->getIsParameter())
885 Symbol->setTag(dwarf::DW_TAG_formal_parameter);
888 if (Element && Element->getIsScoped()) {
890 LVScope *Parent = Symbol->getFunctionParent();
903 Symbol->setType(Element);
949 Scope->setName(CurrentObjectName);
950 if (
options().getAttributeProducer())
951 Scope->setProducer(Compile2.
Version);
952 if (
options().getAttributeLanguage())
966 CurrentObjectName =
"";
997 Scope->setName(CurrentObjectName);
998 if (
options().getAttributeProducer())
999 Scope->setProducer(Compile3.
Version);
1000 if (
options().getAttributeLanguage())
1014 CurrentObjectName =
"";
1022 printTypeIndex(
"Type",
Constant.Type);
1030 Symbol->resetIncludeInPrint();
1048 if (
LVSymbol *Symbol = LocalSymbol) {
1049 Symbol->setHasCodeViewLocation();
1050 LocalSymbol =
nullptr;
1057 Symbol->addLocation(Attr, 0, 0, 0, 0);
1058 Symbol->addLocationOperands(
LVSmall(Attr), {Operand1});
1073 printLocalVariableAddrRange(DefRangeFramePointerRel.
Range,
1075 printLocalVariableAddrGap(DefRangeFramePointerRel.
Gaps);
1082 if (
LVSymbol *Symbol = LocalSymbol) {
1083 Symbol->setHasCodeViewLocation();
1084 LocalSymbol =
nullptr;
1096 Symbol->addLocationOperands(
LVSmall(Attr), {Operand1});
1115 printLocalVariableAddrRange(DefRangeRegisterRel.
Range,
1117 printLocalVariableAddrGap(DefRangeRegisterRel.
Gaps);
1120 if (
LVSymbol *Symbol = LocalSymbol) {
1121 Symbol->setHasCodeViewLocation();
1122 LocalSymbol =
nullptr;
1135 Symbol->addLocationOperands(
LVSmall(Attr), {Operand1, Operand2});
1152 printLocalVariableAddrRange(DefRangeRegister.
Range,
1154 printLocalVariableAddrGap(DefRangeRegister.
Gaps);
1157 if (
LVSymbol *Symbol = LocalSymbol) {
1158 Symbol->setHasCodeViewLocation();
1159 LocalSymbol =
nullptr;
1170 Symbol->addLocationOperands(
LVSmall(Attr), {Operand1});
1189 printLocalVariableAddrRange(DefRangeSubfieldRegister.
Range,
1191 printLocalVariableAddrGap(DefRangeSubfieldRegister.
Gaps);
1194 if (
LVSymbol *Symbol = LocalSymbol) {
1195 Symbol->setHasCodeViewLocation();
1196 LocalSymbol =
nullptr;
1208 Symbol->addLocationOperands(
LVSmall(Attr), {Operand1});
1224 auto ExpectedProgram = Strings.getString(DefRangeSubfield.
Program);
1225 if (!ExpectedProgram) {
1227 return llvm::make_error<CodeViewError>(
1228 "String table offset outside of bounds of String Table!");
1233 printLocalVariableAddrRange(DefRangeSubfield.
Range,
1235 printLocalVariableAddrGap(DefRangeSubfield.
Gaps);
1238 if (
LVSymbol *Symbol = LocalSymbol) {
1239 Symbol->setHasCodeViewLocation();
1240 LocalSymbol =
nullptr;
1251 Symbol->addLocationOperands(
LVSmall(Attr), {Operand1, 0});
1267 auto ExpectedProgram = Strings.getString(DefRange.
Program);
1268 if (!ExpectedProgram) {
1270 return llvm::make_error<CodeViewError>(
1271 "String table offset outside of bounds of String Table!");
1276 printLocalVariableAddrGap(DefRange.
Gaps);
1279 if (
LVSymbol *Symbol = LocalSymbol) {
1280 Symbol->setHasCodeViewLocation();
1281 LocalSymbol =
nullptr;
1292 Symbol->addLocationOperands(
LVSmall(Attr), {Operand1, 0});
1312 if (FrameProcedureOptions::MarkedInline ==
1313 (Flags & FrameProcedureOptions::MarkedInline))
1315 if (FrameProcedureOptions::Inlined ==
1316 (Flags & FrameProcedureOptions::Inlined))
1334 printTypeIndex(
"Type",
Data.Type);
1344 Symbol->setName(
Data.Name);
1354 Symbol->resetIncludeInPrint();
1361 if (Symbol->getParentScope()->removeElement(Symbol))
1366 if (
Record.kind() == SymbolKind::S_GDATA32)
1367 Symbol->setIsExternal();
1379 LVScope *AbstractFunction = Reader->createScopeFunction();
1380 AbstractFunction->setIsSubprogram();
1381 AbstractFunction->
setTag(dwarf::DW_TAG_subprogram);
1383 AbstractFunction->setIsInlinedAbstract();
1390 CVFunctionType,
InlineSite.Inlinee, AbstractFunction))
1397 InlinedFunction->setName(
Name);
1398 InlinedFunction->setLinkageName(
Name);
1402 AbstractFunction, InlinedFunction,
InlineSite))
1412 printTypeIndex(
"Type",
Local.Type);
1418 Symbol->setName(
Local.Name);
1421 Symbol->resetIsVariable();
1424 if (
bool(
Local.Flags & LocalSymFlags::IsCompilerGenerated) ||
1425 Local.Name ==
"this") {
1426 Symbol->setIsArtificial();
1427 Symbol->setIsParameter();
1429 bool(
Local.Flags & LocalSymFlags::IsParameter) ? Symbol->setIsParameter()
1430 : Symbol->setIsVariable();
1434 if (Symbol->getIsParameter())
1435 Symbol->setTag(dwarf::DW_TAG_formal_parameter);
1438 if (Element && Element->getIsScoped()) {
1440 LVScope *Parent = Symbol->getFunctionParent();
1447 Symbol->setType(Element);
1452 LocalSymbol = Symbol;
1465 CurrentObjectName = ObjName.
Name;
1471 if (InFunctionScope)
1472 return llvm::make_error<CodeViewError>(
"Visiting a ProcSym while inside "
1475 InFunctionScope =
true;
1531 if (
options().getGeneralCollectRanges()) {
1537 Function->addObject(LowPC, HighPC);
1540 if ((
options().getAttributePublics() ||
options().getPrintAnyLine()) &&
1565 std::optional<CVType> CVFunctionType;
1566 auto GetRecordType = [&]() ->
bool {
1567 CVFunctionType = Ids.
tryGetType(TIFunctionType);
1568 if (!CVFunctionType)
1573 if (CVFunctionType->kind() == LF_FUNC_ID)
1577 return (CVFunctionType->kind() == LF_MFUNC_ID);
1581 if (!GetRecordType()) {
1582 CVFunctionType = Types.
tryGetType(TIFunctionType);
1583 if (!CVFunctionType)
1584 return llvm::make_error<CodeViewError>(
"Invalid type index");
1588 *CVFunctionType, TIFunctionType,
Function))
1592 if (
Record.kind() == SymbolKind::S_GPROC32 ||
1593 Record.kind() == SymbolKind::S_GPROC32_ID)
1599 if (DemangledSymbol.find(
"scalar deleting dtor") != std::string::npos) {
1604 if (DemangledSymbol.find(
"dynamic atexit destructor for") !=
1616 InFunctionScope =
false;
1622 if (InFunctionScope)
1623 return llvm::make_error<CodeViewError>(
"Visiting a Thunk32Sym while inside "
1626 InFunctionScope =
true;
1642 printTypeIndex(
"Type",
UDT.Type);
1648 if (
Type->getParentScope()->removeElement(
Type))
1662 Type->resetIncludeInPrint();
1665 if (
UDT.Name == RecordName)
1666 Type->resetIncludeInPrint();
1685 W.
printHex(
"BaseOffset", JumpTable.BaseOffset);
1686 W.
printNumber(
"BaseSegment", JumpTable.BaseSegment);
1689 W.
printHex(
"BranchOffset", JumpTable.BranchOffset);
1690 W.
printHex(
"TableOffset", JumpTable.TableOffset);
1691 W.
printNumber(
"BranchSegment", JumpTable.BranchSegment);
1692 W.
printNumber(
"TableSegment", JumpTable.TableSegment);
1693 W.
printNumber(
"EntriesCount", JumpTable.EntriesCount);
1702 switch (
Caller.getKind()) {
1703 case SymbolRecordKind::CallerSym:
1704 FieldName =
"Callee";
1706 case SymbolRecordKind::CalleeSym:
1707 FieldName =
"Caller";
1709 case SymbolRecordKind::InlineesSym:
1710 FieldName =
"Inlinee";
1713 return llvm::make_error<CodeViewError>(
1714 "Unknown CV Record type for a CallerSym object!");
1717 printTypeIndex(FieldName, FuncID);
1724#define DEBUG_TYPE "CodeViewLogicalVisitor"
1731 : Reader(Reader), W(W), Input(Input) {
1734 Shared = std::make_shared<LVShared>(Reader,
this);
1740 StreamIdx ==
StreamTPI ? types() : ids());
1753 << Element->
getName() <<
"\n";
1772 << Element->
getName() <<
"\n";
1804 TypeIndex ParameterType = Indices[Index];
1823 if (Element->getIsFinalized())
1825 Element->setIsFinalized();
1834 LVType *PrevSubrange =
nullptr;
1842 Subrange->setTag(dwarf::DW_TAG_subrange_type);
1852 if (int64_t Count =
Subrange->getCount())
1867 while (CVEntry.
kind() == LF_ARRAY) {
1878 AddSubrangeType(AR);
1879 TIArrayType = TIElementType;
1885 CVType CVElementType =
Types.getType(TIElementType);
1886 if (CVElementType.
kind() == LF_MODIFIER) {
1888 Shared->TypeRecords.find(
StreamTPI, TIElementType);
1901 CVEntry =
Types.getType(TIElementType);
1903 const_cast<CVType &
>(CVEntry), AR)) {
1913 TIArrayType = Shared->ForwardReferences.remap(TIArrayType);
1959 TypeIndex TIName = BI.
getArgs()[BuildInfoRecord::BuildInfoArg::SourceFile];
1980 if (
Class.hasUniqueName())
1985 if (Element->getIsFinalized())
1987 Element->setIsFinalized();
1993 Scope->setName(
Class.getName());
1994 if (
Class.hasUniqueName())
1995 Scope->setLinkageName(
Class.getUniqueName());
1998 if (
Class.isNested()) {
1999 Scope->setIsNested();
2000 createParents(
Class.getName(), Scope);
2003 if (
Class.isScoped())
2004 Scope->setIsScoped();
2008 if (!(
Class.isNested() ||
Class.isScoped())) {
2009 if (
LVScope *Namespace = Shared->NamespaceDeduction.get(
Class.getName()))
2018 TypeIndex ForwardType = Shared->ForwardReferences.find(
Class.getName());
2024 const_cast<CVType &
>(CVReference), ReferenceRecord))
2056 if (Scope->getIsFinalized())
2058 Scope->setIsFinalized();
2062 Scope->setName(
Enum.getName());
2063 if (
Enum.hasUniqueName())
2064 Scope->setLinkageName(
Enum.getUniqueName());
2068 if (
Enum.isNested()) {
2069 Scope->setIsNested();
2070 createParents(
Enum.getName(), Scope);
2073 if (
Enum.isScoped()) {
2074 Scope->setIsScoped();
2075 Scope->setIsEnumClass();
2079 if (!(
Enum.isNested() ||
Enum.isScoped())) {
2080 if (
LVScope *Namespace = Shared->NamespaceDeduction.get(
Enum.getName()))
2106 if (
Error Err = visitFieldListMemberStream(TI, Element,
FieldList.Data))
2132 TypeIndex TIParent = Func.getParentScope();
2133 if (FunctionDcl->getIsInlinedAbstract()) {
2134 FunctionDcl->setName(Func.getName());
2145 TypeIndex TIFunctionType = Func.getFunctionType();
2146 CVType CVFunctionType =
Types.getType(TIFunctionType);
2151 FunctionDcl->setIsFinalized();
2180 if (FunctionDcl->getIsInlinedAbstract()) {
2186 Shared->TypeRecords.find(
StreamTPI, Id.getClassType())))
2187 Class->addElement(FunctionDcl);
2190 TypeIndex TIFunctionType = Id.getFunctionType();
2216 MemberFunction->setIsFinalized();
2218 MemberFunction->setOffset(TI.
getIndex());
2219 MemberFunction->setOffsetFromTypeIndex();
2221 if (ProcessArgumentList) {
2222 ProcessArgumentList =
false;
2224 if (!MemberFunction->getIsStatic()) {
2229 createParameter(ThisPointer,
StringRef(), MemberFunction);
2230 This->setIsArtificial();
2257 Method.
Name = OverloadedMethodName;
2289 bool SeenModifier =
false;
2291 if (Mods &
uint16_t(ModifierOptions::Const)) {
2292 SeenModifier =
true;
2293 LastLink->
setTag(dwarf::DW_TAG_const_type);
2294 LastLink->setIsConst();
2297 if (Mods &
uint16_t(ModifierOptions::Volatile)) {
2305 LastLink->
setTag(dwarf::DW_TAG_volatile_type);
2306 LastLink->setIsVolatile();
2307 LastLink->
setName(
"volatile");
2309 if (Mods &
uint16_t(ModifierOptions::Unaligned)) {
2318 LastLink->setIsUnaligned();
2319 LastLink->
setName(
"unaligned");
2322 LastLink->
setType(ModifiedType);
2341 if (
Ptr.isPointerToMember()) {
2353 Pointee =
Ptr.isPointerToMember()
2354 ? Shared->TypeRecords.find(
StreamTPI,
Ptr.getReferentType())
2364 bool SeenModifier =
false;
2369 if (
Ptr.isRestrict()) {
2370 SeenModifier =
true;
2372 Restrict->setTag(dwarf::DW_TAG_restrict_type);
2379 if (Mode == PointerMode::LValueReference) {
2381 LVType *LReference = Reader->createType();
2382 LReference->setIsModifier();
2383 LastLink->
setType(LReference);
2384 LastLink = LReference;
2387 LastLink->
setTag(dwarf::DW_TAG_reference_type);
2388 LastLink->setIsReference();
2391 if (Mode == PointerMode::RValueReference) {
2393 LVType *RReference = Reader->createType();
2394 RReference->setIsModifier();
2395 LastLink->
setType(RReference);
2396 LastLink = RReference;
2399 LastLink->
setTag(dwarf::DW_TAG_rvalue_reference_type);
2400 LastLink->setIsRvalueReference();
2426 if (ProcessArgumentList) {
2427 ProcessArgumentList =
false;
2449 if (
Union.hasUniqueName())
2458 if (Scope->getIsFinalized())
2460 Scope->setIsFinalized();
2462 Scope->setName(
Union.getName());
2463 if (
Union.hasUniqueName())
2464 Scope->setLinkageName(
Union.getUniqueName());
2467 if (
Union.isNested()) {
2468 Scope->setIsNested();
2469 createParents(
Union.getName(), Scope);
2471 if (
LVScope *Namespace = Shared->NamespaceDeduction.get(
Union.getName()))
2477 if (!
Union.getFieldList().isNoneType()) {
2557 if (
LVScope *Namespace = Shared->NamespaceDeduction.get(
2558 String.getString(),
false)) {
2562 Scope->removeElement(Element);
2648 Symbol->setAccessibilityCode(
Base.getAccess());
2688 Enum.getValue().toString(
Value, 16,
true,
true);
2726 if (NestedType && NestedType->getIsNested()) {
2732 if (NestedTypeName.
size() && RecordName.
size()) {
2734 std::tie(OuterComponent, std::ignore) =
2738 if (OuterComponent.
size() && OuterComponent == RecordName) {
2739 if (!NestedType->getIsScopedAlready()) {
2740 Scope->addElement(NestedType);
2741 NestedType->setIsScopedAlready();
2744 Typedef->resetIncludeInPrint();
2770 ProcessArgumentList =
true;
2772 MemberFunction->setIsFinalized();
2775 MemberFunction->setName(Method.
getName());
2776 MemberFunction->setAccessibilityCode(Method.
getAccess());
2779 if (
Kind == MethodKind::Static)
2780 MemberFunction->setIsStatic();
2781 MemberFunction->setVirtualityCode(
Kind);
2784 if (MethodOptions::CompilerGenerated ==
2785 (Flags & MethodOptions::CompilerGenerated))
2786 MemberFunction->setIsArtificial();
2794 ProcessArgumentList =
false;
2814 OverloadedMethodName = Method.
getName();
2869 Symbol->setAccessibilityCode(
Base.getAccess());
2870 Symbol->setVirtualityCode(MethodKind::Virtual);
2888#define MEMBER_RECORD(EnumName, EnumVal, Name) \
2891 visitKnownMember<Name##Record>(Record, Callbacks, TI, Element)) \
2895#define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) \
2896 MEMBER_RECORD(EnumVal, EnumVal, AliasName)
2897#define TYPE_RECORD(EnumName, EnumVal, Name)
2898#define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
2899#include "llvm/DebugInfo/CodeView/CodeViewTypes.def"
2915#define TYPE_RECORD(EnumName, EnumVal, Name) \
2917 if (Error Err = visitKnownRecord<Name##Record>(Record, TI, Element)) \
2921#define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) \
2922 TYPE_RECORD(EnumVal, EnumVal, AliasName)
2923#define MEMBER_RECORD(EnumName, EnumVal, Name)
2924#define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
2925#include "llvm/DebugInfo/CodeView/CodeViewTypes.def"
2932Error LVLogicalVisitor::visitFieldListMemberStream(
2941 while (!Reader.empty()) {
2942 if (
Error Err = Reader.readEnum(Leaf))
2960 if (!ScopeStack.empty())
2962 InCompileUnitScope =
true;
2986 if (
options().getAttributeBase())
2993 case TypeLeafKind::LF_ENUMERATE:
2997 case TypeLeafKind::LF_MODIFIER:
3001 case TypeLeafKind::LF_POINTER:
3009 case TypeLeafKind::LF_BCLASS:
3010 case TypeLeafKind::LF_IVBCLASS:
3011 case TypeLeafKind::LF_VBCLASS:
3016 case TypeLeafKind::LF_MEMBER:
3017 case TypeLeafKind::LF_STMEMBER:
3024 case TypeLeafKind::LF_ARRAY:
3028 case TypeLeafKind::LF_CLASS:
3033 case TypeLeafKind::LF_ENUM:
3037 case TypeLeafKind::LF_METHOD:
3038 case TypeLeafKind::LF_ONEMETHOD:
3039 case TypeLeafKind::LF_PROCEDURE:
3044 case TypeLeafKind::LF_STRUCTURE:
3049 case TypeLeafKind::LF_UNION:
3068 case SymbolKind::S_UDT:
3074 case SymbolKind::S_CONSTANT:
3080 case SymbolKind::S_BPREL32:
3081 case SymbolKind::S_REGREL32:
3082 case SymbolKind::S_GDATA32:
3083 case SymbolKind::S_LDATA32:
3084 case SymbolKind::S_LOCAL:
3094 case SymbolKind::S_BLOCK32:
3099 case SymbolKind::S_COMPILE2:
3100 case SymbolKind::S_COMPILE3:
3105 case SymbolKind::S_INLINESITE:
3106 case SymbolKind::S_INLINESITE2:
3111 case SymbolKind::S_LPROC32:
3112 case SymbolKind::S_GPROC32:
3113 case SymbolKind::S_LPROC32_ID:
3114 case SymbolKind::S_GPROC32_ID:
3115 case SymbolKind::S_SEPCODE:
3116 case SymbolKind::S_THUNK32:
3136 Element->setIsFinalized();
3146 Element->setOffsetFromTypeIndex();
3157 Element->setOffsetFromTypeIndex();
3171 Symbol->setName(
Name);
3177 if (CVMemberType.
kind() == LF_BITFIELD) {
3192 LVSymbol *Parameter = Reader->createSymbol();
3194 Parameter->setIsParameter();
3195 Parameter->
setTag(dwarf::DW_TAG_formal_parameter);
3215 return static_cast<LVType *
>(Element);
3232 return static_cast<LVType *
>(Element);
3263 if (Components.size() < 2)
3265 Components.pop_back();
3267 LVStringRefs::size_type FirstNamespace;
3268 LVStringRefs::size_type FirstAggregate;
3269 std::tie(FirstNamespace, FirstAggregate) =
3270 Shared->NamespaceDeduction.find(Components);
3273 W.
printString(
"First Namespace", Components[FirstNamespace]);
3274 W.
printString(
"First NonNamespace", Components[FirstAggregate]);
3278 if (FirstNamespace < FirstAggregate) {
3279 Shared->NamespaceDeduction.get(
3281 Components.begin() + FirstAggregate));
3290 LVStringRefs(Components.begin(), Components.begin() + FirstAggregate));
3293 for (LVStringRefs::size_type Index = FirstAggregate;
3296 Components.begin() + Index + 1),
3298 TIAggregate = Shared->ForwardReferences.remap(
3299 Shared->TypeRecords.find(
StreamTPI, AggregateName));
3309 if (Aggregate && !Element->getIsScopedAlready()) {
3311 Element->setIsScopedAlready();
3318 TI = Shared->ForwardReferences.remap(TI);
3321 LVElement *Element = Shared->TypeRecords.find(StreamIdx, TI);
3329 return (TypeName.back() ==
'*') ? createPointerType(TI, TypeName)
3330 : createBaseType(TI, TypeName);
3338 if (Element->getIsFinalized())
3352 Element->setIsFinalized();
3359 for (
const TypeIndex &Entry : Shared->LineRecords) {
3375 if (
LVElement *Element = Shared->TypeRecords.find(
3379 Shared->StringRecords.findIndex(
Line.getSourceFile()));
3387 Shared->NamespaceDeduction.init();
3393 if (!
options().getInternalTag())
3398 auto NewLine = [&]() {
3411 Shared->TypeKinds.clear();
3414 OS <<
"\nSymbols:\n";
3417 Shared->SymbolKinds.clear();
3431 ParentLowPC = (*
Locations->begin())->getLowerAddress();
3438 LVInlineeInfo::iterator Iter = InlineeInfo.find(
InlineSite.Inlinee);
3439 if (Iter != InlineeInfo.end()) {
3440 LineNumber = Iter->second.first;
3449 dbgs() <<
"inlineSiteAnnotation\n"
3450 <<
"Abstract: " << AbstractFunction->
getName() <<
"\n"
3451 <<
"Inlined: " << InlinedFunction->
getName() <<
"\n"
3452 <<
"Parent: " << Parent->
getName() <<
"\n"
3453 <<
"Low PC: " <<
hexValue(ParentLowPC) <<
"\n";
3457 if (!
options().getPrintLines())
3464 int32_t LineOffset = LineNumber;
3468 auto UpdateCodeOffset = [&](
uint32_t Delta) {
3475 auto UpdateLineOffset = [&](int32_t Delta) {
3476 LineOffset += Delta;
3478 char Sign = Delta > 0 ?
'+' :
'-';
3479 dbgs() <<
formatv(
" line {0} ({1}{2})", LineOffset, Sign,
3483 auto UpdateFileOffset = [&](int32_t
Offset) {
3489 auto CreateLine = [&]() {
3493 Line->setLineNumber(LineOffset);
3500 bool SeenLowAddress =
false;
3501 bool SeenHighAddress =
false;
3505 for (
auto &Annot :
InlineSite.annotations()) {
3512 switch (Annot.OpCode) {
3513 case BinaryAnnotationsOpCode::ChangeCodeOffset:
3514 case BinaryAnnotationsOpCode::CodeOffset:
3515 case BinaryAnnotationsOpCode::ChangeCodeLength:
3516 UpdateCodeOffset(Annot.U1);
3518 if (Annot.OpCode == BinaryAnnotationsOpCode::ChangeCodeOffset) {
3521 SeenLowAddress =
true;
3524 if (Annot.OpCode == BinaryAnnotationsOpCode::ChangeCodeLength) {
3526 SeenHighAddress =
true;
3529 case BinaryAnnotationsOpCode::ChangeCodeLengthAndCodeOffset:
3530 UpdateCodeOffset(Annot.U2);
3533 case BinaryAnnotationsOpCode::ChangeLineOffset:
3534 case BinaryAnnotationsOpCode::ChangeCodeOffsetAndLineOffset:
3535 UpdateCodeOffset(Annot.U1);
3536 UpdateLineOffset(Annot.S1);
3539 BinaryAnnotationsOpCode::ChangeCodeOffsetAndLineOffset)
3542 case BinaryAnnotationsOpCode::ChangeFile:
3543 UpdateFileOffset(Annot.U1);
3549 if (SeenLowAddress && SeenHighAddress) {
3550 SeenLowAddress =
false;
3551 SeenHighAddress =
false;
3552 InlinedFunction->
addObject(LowPC, HighPC);
for(const MachineOperand &MO :llvm::drop_begin(OldMI.operands(), Desc.getNumOperands()))
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
AMDGPU Lower Kernel Arguments
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
size_t size() const
size - Get the array size.
An implementation of BinaryStream which holds its entire data set in a single contiguous buffer.
Provides read only access to a subclass of BinaryStream.
This is an important base class in LLVM.
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
StringRef getName() const
virtual void printString(StringRef Value)
void indent(int Levels=1)
void unindent(int Levels=1)
void printEnum(StringRef Label, T Value, ArrayRef< EnumEntry< TEnum > > EnumValues)
virtual raw_ostream & getOStream()
virtual raw_ostream & startLine()
virtual void printNumber(StringRef Label, char Value)
void printHex(StringRef Label, T Value)
void printFlags(StringRef Label, T Value, ArrayRef< EnumEntry< TFlag > > Flags, TFlag EnumMask1={}, TFlag EnumMask2={}, TFlag EnumMask3={}, ArrayRef< FlagEntry > ExtraFlags={})
virtual void printBoolean(StringRef Label, bool Value)
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
StringRef - Represent a constant reference to a string, i.e.
std::string str() const
str - Get the contents as an std::string.
constexpr size_t size() const
size - Get the string size.
Target - Wrapper for Target specific information.
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
LLVM_ABI Value(Type *Ty, unsigned scid)
LLVM_ABI void setName(const Twine &Name)
Change the name of the value.
TypeIndex getElementType() const
TypeIndex getIndexType() const
StringRef getName() const
uint8_t getBitSize() const
TypeIndex getType() const
uint8_t getBitOffset() const
ArrayRef< TypeIndex > getArgs() const
uint8_t getLanguage() const
uint32_t getFlags() const
CompileSym3Flags getFlags() const
SourceLanguage getLanguage() const
Represents a read-only view of a CodeView string table.
DefRangeFramePointerRelHeader Hdr
LocalVariableAddrRange Range
uint32_t getRelocationOffset() const
std::vector< LocalVariableAddrGap > Gaps
DefRangeRegisterRelHeader Hdr
bool hasSpilledUDTMember() const
uint32_t getRelocationOffset() const
uint16_t offsetInParent() const
std::vector< LocalVariableAddrGap > Gaps
LocalVariableAddrRange Range
uint32_t getRelocationOffset() const
std::vector< LocalVariableAddrGap > Gaps
LocalVariableAddrRange Range
DefRangeRegisterHeader Hdr
LocalVariableAddrRange Range
uint32_t getRelocationOffset() const
std::vector< LocalVariableAddrGap > Gaps
DefRangeSubfieldRegisterHeader Hdr
std::vector< LocalVariableAddrGap > Gaps
LocalVariableAddrRange Range
uint32_t getRelocationOffset() const
std::vector< LocalVariableAddrGap > Gaps
uint32_t getRelocationOffset() const
LocalVariableAddrRange Range
uint32_t getSignature() const
RegisterId getLocalFramePtrReg(CPUType CPU) const
Extract the register this frame uses to refer to local variables.
RegisterId getParamFramePtrReg(CPUType CPU) const
Extract the register this frame uses to refer to parameters.
FrameProcedureOptions Flags
Provides amortized O(1) random access to a CodeView type stream.
std::optional< CVType > tryGetType(TypeIndex Index)
CVType getType(TypeIndex Index) override
StringRef getTypeName(TypeIndex Index) override
LF_INDEX - Used to chain two large LF_FIELDLIST or LF_METHODLIST records together.
TypeIndex getContinuationIndex() const
TypeIndex getReturnType() const
int32_t getThisPointerAdjustment() const
TypeIndex getArgumentList() const
uint16_t getParameterCount() const
TypeIndex getThisType() const
TypeIndex getClassType() const
std::vector< OneMethodRecord > Methods
int32_t getVFTableOffset() const
TypeIndex getType() const
bool isIntroducingVirtual() const
MemberAccess getAccess() const
MethodKind getMethodKind() const
StringRef getName() const
For method overload sets. LF_METHOD.
StringRef getName() const
uint16_t getNumOverloads() const
TypeIndex getMethodList() const
uint32_t getSignature() const
StringRef getPrecompFilePath() const
uint32_t getTypesCount() const
uint32_t getStartTypeIndex() const
uint32_t getRelocationOffset() const
TypeIndex getReturnType() const
TypeIndex getArgumentList() const
uint16_t getParameterCount() const
TypeIndex getFieldList() const
static Error deserializeAs(CVType &CVT, T &Record)
static TypeIndex fromArrayIndex(uint32_t Index)
SimpleTypeKind getSimpleKind() const
void setIndex(uint32_t I)
static const uint32_t FirstNonSimpleIndex
static LLVM_ABI StringRef simpleTypeName(TypeIndex TI)
uint32_t getIndex() const
StringRef getName() const
const GUID & getGuid() const
void addCallbackToPipeline(TypeVisitorCallbacks &Callbacks)
virtual Error visitUnknownMember(CVMemberRecord &Record)
virtual Error visitMemberEnd(CVMemberRecord &Record)
virtual Error visitMemberBegin(CVMemberRecord &Record)
TypeIndex getSourceFile() const
uint16_t getModule() const
uint32_t getLineNumber() const
uint32_t getLineNumber() const
TypeIndex getSourceFile() const
TypeIndex getType() const
uint32_t getVFPtrOffset() const
TypeIndex getOverriddenVTable() const
ArrayRef< StringRef > getMethodNames() const
StringRef getName() const
TypeIndex getCompleteClass() const
uint32_t getEntryCount() const
Stores all information relating to a compile unit, be it in its original instance in the object file ...
void addInlineeLines(LVScope *Scope, LVLines &Lines)
LVAddress getSymbolTableAddress(StringRef Name)
LVAddress linearAddress(uint16_t Segment, uint32_t Offset, LVAddress Addendum=0)
void addToSymbolTable(StringRef Name, LVScope *Function, LVSectionIndex SectionIndex=0)
void addModule(LVScope *Scope)
void getLinkageName(const llvm::object::coff_section *CoffSection, uint32_t RelocOffset, uint32_t Offset, StringRef *RelocSym)
static StringRef getSymbolKindName(SymbolKind Kind)
virtual void setCount(int64_t Value)
virtual void setBitSize(uint32_t Size)
virtual void updateLevel(LVScope *Parent, bool Moved=false)
virtual int64_t getCount() const
void setInlineCode(uint32_t Code)
virtual void setReference(LVElement *Element)
void setName(StringRef ElementName) override
StringRef getName() const override
void setType(LVElement *Element=nullptr)
void setFilenameIndex(size_t Index)
Error visitKnownRecord(CVType &Record, ArgListRecord &Args, TypeIndex TI, LVElement *Element)
void printRecords(raw_ostream &OS) const
void stopProcessArgumentList()
void printTypeEnd(CVType &Record)
Error visitMemberRecord(CVMemberRecord &Record, TypeVisitorCallbacks &Callbacks, TypeIndex TI, LVElement *Element)
Error visitKnownMember(CVMemberRecord &Record, BaseClassRecord &Base, TypeIndex TI, LVElement *Element)
void printMemberEnd(CVMemberRecord &Record)
void setCompileUnitName(std::string Name)
LVElement * CurrentElement
Error inlineSiteAnnotation(LVScope *AbstractFunction, LVScope *InlinedFunction, InlineSiteSym &InlineSite)
LVLogicalVisitor(LVCodeViewReader *Reader, ScopedPrinter &W, llvm::pdb::InputFile &Input)
void printTypeIndex(StringRef FieldName, TypeIndex TI, uint32_t StreamIdx)
Error visitUnknownMember(CVMemberRecord &Record, TypeIndex TI)
void pushScope(LVScope *Scope)
Error visitUnknownType(CVType &Record, TypeIndex TI)
void startProcessArgumentList()
void addElement(LVScope *Scope, bool IsCompileUnit)
void printTypeBegin(CVType &Record, TypeIndex TI, LVElement *Element, uint32_t StreamIdx)
LVElement * getElement(uint32_t StreamIdx, TypeIndex TI, LVScope *Parent=nullptr)
LVScope * getReaderScope() const
void printMemberBegin(CVMemberRecord &Record, TypeIndex TI, LVElement *Element, uint32_t StreamIdx)
Error finishVisitation(CVType &Record, TypeIndex TI, LVElement *Element)
LVElement * createElement(TypeLeafKind Kind)
LVScope * getParentScope() const
void setOffset(LVOffset DieOffset)
LVOffset getOffset() const
void setLineNumber(uint32_t Number)
void setTag(dwarf::Tag Tag)
codeview::CPUType getCompileUnitCPUType()
void setCompileUnitCPUType(codeview::CPUType Type)
virtual bool isSystemEntry(LVElement *Element, StringRef Name={}) const
LVScopeCompileUnit * getCompileUnit() const
void setCompileUnit(LVScope *Scope)
void addPublicName(LVScope *Scope, LVAddress LowPC, LVAddress HighPC)
void addElement(LVElement *Element)
void addObject(LVLocation *Location)
const LVLocations * getRanges() const
void getLinkageName(uint32_t RelocOffset, uint32_t Offset, StringRef *RelocSym=nullptr)
void printRelocatedField(StringRef Label, uint32_t RelocOffset, uint32_t Offset, StringRef *RelocSym=nullptr)
DebugStringTableSubsectionRef getStringTable() override
StringRef getFileNameForFileOffset(uint32_t FileOffset) override
Error visitSymbolEnd(CVSymbol &Record) override
Error visitKnownRecord(CVSymbol &Record, BlockSym &Block) override
Error visitSymbolBegin(CVSymbol &Record) override
Error visitUnknownSymbol(CVSymbol &Record) override
Action to take on unknown symbols. By default, they are ignored.
Error visitMemberEnd(CVMemberRecord &Record) override
Error visitUnknownMember(CVMemberRecord &Record) override
Error visitTypeBegin(CVType &Record) override
Paired begin/end actions for all types.
Error visitMemberBegin(CVMemberRecord &Record) override
Error visitKnownRecord(CVType &Record, BuildInfoRecord &Args) override
Error visitUnknownType(CVType &Record) override
Action to take on unknown types. By default, they are ignored.
void setBitSize(uint32_t Size) override
This class implements an extremely fast bulk output stream that can only output to a stream.
constexpr char TypeName[]
Key for Kernel::Arg::Metadata::mTypeName.
PointerMode
Equivalent to CV_ptrmode_e.
MethodKind
Part of member attribute flags. (CV_methodprop_e)
CPUType
These values correspond to the CV_CPU_TYPE_e enumeration, and are documented here: https://msdn....
LLVM_ABI ArrayRef< EnumEntry< uint16_t > > getJumpTableEntrySizeNames()
bool symbolEndsScope(SymbolKind Kind)
Return true if this ssymbol ends a scope.
MethodOptions
Equivalent to CV_fldattr_t bitfield.
LLVM_ABI ArrayRef< EnumEntry< SymbolKind > > getSymbolTypeNames()
MemberAccess
Source-level access specifier. (CV_access_e)
bool symbolOpensScope(SymbolKind Kind)
Return true if this symbol opens a scope.
TypeLeafKind
Duplicate copy of the above enum, but using the official CV names.
LLVM_ABI ArrayRef< EnumEntry< uint16_t > > getLocalFlagNames()
LLVM_ABI ArrayRef< EnumEntry< uint16_t > > getRegisterNames(CPUType Cpu)
bool isAggregate(CVType CVT)
Given an arbitrary codeview type, determine if it is an LF_STRUCTURE, LF_CLASS, LF_INTERFACE,...
LLVM_ABI ArrayRef< EnumEntry< uint8_t > > getProcSymFlagNames()
TypeRecordKind
Distinguishes individual records in .debug$T or .debug$P section or PDB type stream.
SymbolKind
Duplicate copy of the above enum, but using the official CV names.
LLVM_ABI uint64_t getSizeInBytesForTypeRecord(CVType CVT)
Given an arbitrary codeview type, return the type's size in the case of aggregate (LF_STRUCTURE,...
LLVM_ABI ArrayRef< EnumEntry< unsigned > > getCPUTypeNames()
LLVM_ABI ArrayRef< EnumEntry< SourceLanguage > > getSourceLanguageNames()
LLVM_ABI uint64_t getSizeInBytesForTypeIndex(TypeIndex TI)
Given an arbitrary codeview type index, determine its size.
LLVM_ABI TypeIndex getModifiedType(const CVType &CVT)
Given a CVType which is assumed to be an LF_MODIFIER, return the TypeIndex of the type that the LF_MO...
SourceLanguage
These values correspond to the CV_CFL_LANG enumeration in the Microsoft Debug Interface Access SDK,...
LLVM_ABI ArrayRef< EnumEntry< uint32_t > > getCompileSym3FlagNames()
LLVM_ABI void printTypeIndex(ScopedPrinter &Printer, StringRef FieldName, TypeIndex TI, TypeCollection &Types)
@ DW_INL_declared_inlined
constexpr Tag DW_TAG_unaligned
Scope
Defines the scope in which this symbol should be visible: Default – Visible in the public interface o...
FormattedNumber hexValue(uint64_t N, unsigned Width=HEX_WIDTH, bool Upper=false)
static TypeIndex getTrueType(TypeIndex &TI)
std::vector< StringRef > LVStringRefs
static StringRef getRecordName(LazyRandomTypeCollection &Types, TypeIndex TI)
std::vector< TypeIndex > LVLineRecords
constexpr unsigned int DWARF_CHAR_BIT
LLVM_ABI LVStringRefs getAllLexicalComponents(StringRef Name)
LLVM_ABI std::string transformPath(StringRef Path)
LLVM_ABI LVLexicalComponent getInnerComponent(StringRef Name)
static const EnumEntry< TypeLeafKind > LeafTypeNames[]
std::set< SymbolKind > LVSymbolKinds
std::set< TypeLeafKind > LVTypeKinds
LLVM_ABI std::string getScopedName(const LVStringRefs &Components, StringRef BaseName={})
std::tuple< LVStringRefs::size_type, LVStringRefs::size_type > LVLexicalIndex
LLVM_ABI std::string formatTypeLeafKind(codeview::TypeLeafKind K)
Print(const T &, const DataFlowGraph &) -> Print< T >
This is an optimization pass for GlobalISel generic memory operations.
auto find(R &&Range, const T &Val)
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly.
std::tuple< uint64_t, uint32_t > InlineSite
LLVM_GET_TYPE_NAME_CONSTEXPR StringRef getTypeName()
We provide a function which tries to compute the (demangled) name of a type statically.
auto formatv(bool Validate, const char *Fmt, Ts &&...Vals)
decltype(auto) get(const PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info > &Pair)
LLVM_ABI 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.
@ Mod
The access may modify the value stored in memory.
support::detail::RepeatAdapter< T > fmt_repeat(T &&Item, size_t Count)
support::detail::AlignAdapter< T > fmt_align(T &&Item, AlignStyle Where, size_t Amount, char Fill=' ')
void erase_if(Container &C, UnaryPredicate P)
Provide a container algorithm similar to C++ Library Fundamentals v2's erase_if which is equivalent t...
void consumeError(Error Err)
Consume a Error without doing anything.
DEMANGLE_ABI std::string demangle(std::string_view MangledName)
Attempt to demangle a string using different demangling schemes.
MethodOptions getFlags() const
Get the flags that are not included in access control or method properties.
LVShared(LVCodeViewReader *Reader, LVLogicalVisitor *Visitor)
LVLineRecords LineRecords
LVTypeRecords TypeRecords
LVCodeViewReader * Reader
LVLogicalVisitor * Visitor
LVNamespaceDeduction NamespaceDeduction
LVSymbolKinds SymbolKinds
LVStringRecords StringRecords
LVForwardReferences ForwardReferences
A source language supported by any of the debug info representations.