LLVM  9.0.0svn
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 
25 using namespace llvm;
26 using namespace llvm::codeview;
27 
30  const StringsAndChecksumsRef &State) {
32  switch (R.kind()) {
34  DebugLinesSubsectionRef Fragment;
35  if (auto EC = Fragment.initialize(Reader))
36  return EC;
37 
38  return V.visitLines(Fragment, State);
39  }
42  if (auto EC = Fragment.initialize(Reader))
43  return EC;
44 
45  return V.visitFileChecksums(Fragment, State);
46  }
49  if (auto EC = Fragment.initialize(Reader))
50  return EC;
51  return V.visitInlineeLines(Fragment, State);
52  }
55  if (auto EC = Section.initialize(Reader))
56  return EC;
57  return V.visitCrossModuleExports(Section, State);
58  }
61  if (auto EC = Section.initialize(Reader))
62  return EC;
63  return V.visitCrossModuleImports(Section, State);
64  }
67  if (auto EC = Section.initialize(Reader))
68  return EC;
69  return V.visitSymbols(Section, State);
70  }
73  if (auto EC = Section.initialize(Reader))
74  return EC;
75  return V.visitStringTable(Section, State);
76  }
79  if (auto EC = Section.initialize(Reader))
80  return EC;
81  return V.visitFrameData(Section, State);
82  }
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 }
virtual Error visitUnknown(DebugUnknownSubsectionRef &Unknown)
virtual Error visitCOFFSymbolRVAs(DebugSymbolRVASubsectionRef &RVAs, const StringsAndChecksumsRef &State)=0
This class represents lattice values for constants.
Definition: AllocatorList.h:23
virtual Error visitCrossModuleImports(DebugCrossModuleImportsSubsectionRef &CSE, const StringsAndChecksumsRef &State)=0
Error initialize(BinaryStreamReader Reader)
virtual Error visitFileChecksums(DebugChecksumsSubsectionRef &Checksums, const StringsAndChecksumsRef &State)=0
virtual Error visitFrameData(DebugFrameDataSubsectionRef &FD, const StringsAndChecksumsRef &State)=0
virtual Error visitStringTable(DebugStringTableSubsectionRef &ST, const StringsAndChecksumsRef &State)=0
virtual Error visitInlineeLines(DebugInlineeLinesSubsectionRef &Inlinees, const StringsAndChecksumsRef &State)=0
Error visitDebugSubsection(const DebugSubsectionRecord &R, DebugSubsectionVisitor &V, const StringsAndChecksumsRef &State)
virtual Error visitCrossModuleExports(DebugCrossModuleExportsSubsectionRef &CSE, const StringsAndChecksumsRef &State)=0
Represents a read-only view of a CodeView string table.
virtual Error visitLines(DebugLinesSubsectionRef &Lines, const StringsAndChecksumsRef &State)=0
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
virtual Error visitSymbols(DebugSymbolsSubsectionRef &CSE, const StringsAndChecksumsRef &State)=0
Provides read only access to a subclass of BinaryStream.
Error initialize(BinaryStreamReader Reader)