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
24
25using namespace llvm;
26using namespace llvm::codeview;
27
30 const StringsAndChecksumsRef &State) {
31 BinaryStreamReader Reader(R.getRecordData());
32 switch (R.kind()) {
33 case DebugSubsectionKind::Lines: {
35 if (auto EC = Fragment.initialize(Reader))
36 return EC;
37
38 return V.visitLines(Fragment, State);
39 }
40 case DebugSubsectionKind::FileChecksums: {
42 if (auto EC = Fragment.initialize(Reader))
43 return EC;
44
45 return V.visitFileChecksums(Fragment, State);
46 }
47 case DebugSubsectionKind::InlineeLines: {
49 if (auto EC = Fragment.initialize(Reader))
50 return EC;
51 return V.visitInlineeLines(Fragment, State);
52 }
53 case DebugSubsectionKind::CrossScopeExports: {
55 if (auto EC = Section.initialize(Reader))
56 return EC;
57 return V.visitCrossModuleExports(Section, State);
58 }
59 case DebugSubsectionKind::CrossScopeImports: {
61 if (auto EC = Section.initialize(Reader))
62 return EC;
63 return V.visitCrossModuleImports(Section, State);
64 }
65 case DebugSubsectionKind::Symbols: {
67 if (auto EC = Section.initialize(Reader))
68 return EC;
69 return V.visitSymbols(Section, State);
70 }
71 case DebugSubsectionKind::StringTable: {
73 if (auto EC = Section.initialize(Reader))
74 return EC;
75 return V.visitStringTable(Section, State);
76 }
77 case DebugSubsectionKind::FrameData: {
79 if (auto EC = Section.initialize(Reader))
80 return EC;
81 return V.visitFrameData(Section, State);
82 }
83 case DebugSubsectionKind::CoffSymbolRVA: {
85 if (auto EC = Section.initialize(Reader))
86 return EC;
87 return V.visitCOFFSymbolRVAs(Section, State);
88 }
89 default: {
90 DebugUnknownSubsectionRef Fragment(R.kind(), R.getRecordData());
91 return V.visitUnknown(Fragment);
92 }
93 }
94}
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