LLVM  6.0.0svn
DebugSubsectionVisitor.cpp
Go to the documentation of this file.
1 //===- DebugSubsectionVisitor.cpp -------------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
11 
25 
26 using namespace llvm;
27 using namespace llvm::codeview;
28 
31  const StringsAndChecksumsRef &State) {
33  switch (R.kind()) {
35  DebugLinesSubsectionRef Fragment;
36  if (auto EC = Fragment.initialize(Reader))
37  return EC;
38 
39  return V.visitLines(Fragment, State);
40  }
43  if (auto EC = Fragment.initialize(Reader))
44  return EC;
45 
46  return V.visitFileChecksums(Fragment, State);
47  }
50  if (auto EC = Fragment.initialize(Reader))
51  return EC;
52  return V.visitInlineeLines(Fragment, State);
53  }
56  if (auto EC = Section.initialize(Reader))
57  return EC;
58  return V.visitCrossModuleExports(Section, State);
59  }
62  if (auto EC = Section.initialize(Reader))
63  return EC;
64  return V.visitCrossModuleImports(Section, State);
65  }
68  if (auto EC = Section.initialize(Reader))
69  return EC;
70  return V.visitSymbols(Section, State);
71  }
74  if (auto EC = Section.initialize(Reader))
75  return EC;
76  return V.visitStringTable(Section, State);
77  }
80  if (auto EC = Section.initialize(Reader))
81  return EC;
82  return V.visitFrameData(Section, State);
83  }
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 }
virtual Error visitUnknown(DebugUnknownSubsectionRef &Unknown)
virtual Error visitCOFFSymbolRVAs(DebugSymbolRVASubsectionRef &RVAs, const StringsAndChecksumsRef &State)=0
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
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:156
virtual Error visitSymbols(DebugSymbolsSubsectionRef &CSE, const StringsAndChecksumsRef &State)=0
Provides read only access to a subclass of BinaryStream.
Error initialize(BinaryStreamReader Reader)