LLVM 20.0.0git
DebugSubsectionVisitor.cpp
Go to the documentation of this file.
1//===- DebugSubsectionVisitor.cpp -------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
10
25
26using namespace llvm;
27using namespace llvm::codeview;
28
31 const StringsAndChecksumsRef &State) {
32 BinaryStreamReader Reader(R.getRecordData());
33 switch (R.kind()) {
34 case DebugSubsectionKind::Lines: {
36 if (auto EC = Fragment.initialize(Reader))
37 return EC;
38
39 return V.visitLines(Fragment, State);
40 }
41 case DebugSubsectionKind::FileChecksums: {
43 if (auto EC = Fragment.initialize(Reader))
44 return EC;
45
46 return V.visitFileChecksums(Fragment, State);
47 }
48 case DebugSubsectionKind::InlineeLines: {
50 if (auto EC = Fragment.initialize(Reader))
51 return EC;
52 return V.visitInlineeLines(Fragment, State);
53 }
54 case DebugSubsectionKind::CrossScopeExports: {
56 if (auto EC = Section.initialize(Reader))
57 return EC;
58 return V.visitCrossModuleExports(Section, State);
59 }
60 case DebugSubsectionKind::CrossScopeImports: {
62 if (auto EC = Section.initialize(Reader))
63 return EC;
64 return V.visitCrossModuleImports(Section, State);
65 }
66 case DebugSubsectionKind::Symbols: {
68 if (auto EC = Section.initialize(Reader))
69 return EC;
70 return V.visitSymbols(Section, State);
71 }
72 case DebugSubsectionKind::StringTable: {
74 if (auto EC = Section.initialize(Reader))
75 return EC;
76 return V.visitStringTable(Section, State);
77 }
78 case DebugSubsectionKind::FrameData: {
80 if (auto EC = Section.initialize(Reader))
81 return EC;
82 return V.visitFrameData(Section, State);
83 }
84 case DebugSubsectionKind::CoffSymbolRVA: {
86 if (auto EC = Section.initialize(Reader))
87 return EC;
88 return V.visitCOFFSymbolRVAs(Section, State);
89 }
90 default: {
91 DebugUnknownSubsectionRef Fragment(R.kind(), R.getRecordData());
92 return V.visitUnknown(Fragment);
93 }
94 }
95}
Provides read only access to a subclass of BinaryStream.
Lightweight error class with error context and mandatory checking.
Definition: Error.h:160
Error initialize(BinaryStreamReader Reader)
Represents a read-only view of a CodeView string table.
Error visitDebugSubsection(const DebugSubsectionRecord &R, DebugSubsectionVisitor &V, const StringsAndChecksumsRef &State)
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18