LLVM: lib/DebugInfo/CodeView/DebugInlineeLinesSubsection.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
18#include
19#include
20
21using namespace llvm;
23
27
28 if (auto EC = Reader.readObject(Item.Header))
29 return EC;
30
31 if (HasExtraFiles) {
33 if (auto EC = Reader.readInteger(ExtraFileCount))
34 return EC;
35 if (auto EC = Reader.readArray(Item.ExtraFiles, ExtraFileCount))
36 return EC;
37 }
38
39 Len = Reader.getOffset();
41}
42
45
47 if (auto EC = Reader.readEnum(Signature))
48 return EC;
49
50 Lines.getExtractor().HasExtraFiles = hasExtraFiles();
52 return EC;
53
56}
57
61
65 HasExtraFiles(HasExtraFiles) {}
66
68
70
71
73 if (HasExtraFiles) {
74
76
77
79 }
82}
83
86 if (HasExtraFiles)
88
90 return EC;
91
92 for (const auto &E : Entries) {
94 return EC;
95
96 if (!HasExtraFiles)
97 continue;
98
100 return EC;
102 return EC;
103 }
104
106}
107
109 uint32_t Offset = Checksums.mapChecksumOffset(FileName);
110
111 auto &Entry = Entries.back();
113 ++ExtraFileCount;
114}
115
119 uint32_t Offset = Checksums.mapChecksumOffset(FileName);
120
121 Entries.emplace_back();
122 auto &Entry = Entries.back();
126}
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Provides read only access to a subclass of BinaryStream.
Error readEnum(T &Dest)
Similar to readInteger.
uint64_t bytesRemaining() const
Error readArray(ArrayRef< T > &Array, uint32_t NumElements)
Get a reference to a NumElements element array of objects of type T from the underlying stream as if ...
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.
Provides write only access to a subclass of WritableBinaryStream.
Error writeArray(ArrayRef< T > Array)
Writes an array of objects of type T to the underlying stream, as if by using memcpy.
Error writeInteger(T Value)
Write the integer Value to the underlying stream in the specified endianness.
Error writeEnum(T Num)
Similar to writeInteger.
Error writeObject(const T &Obj)
Writes the object Obj to the underlying stream, as if by using memcpy.
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
StringRef - Represent a constant reference to a string, i.e.
LLVM_ABI bool hasExtraFiles() const
Definition DebugInlineeLinesSubsection.cpp:58
LLVM_ABI DebugInlineeLinesSubsectionRef()
Definition DebugInlineeLinesSubsection.cpp:43
LLVM_ABI Error initialize(BinaryStreamReader Reader)
Definition DebugInlineeLinesSubsection.cpp:46
uint32_t calculateSerializedSize() const override
Definition DebugInlineeLinesSubsection.cpp:67
void addInlineSite(TypeIndex FuncId, StringRef FileName, uint32_t SourceLine)
Definition DebugInlineeLinesSubsection.cpp:116
Error commit(BinaryStreamWriter &Writer) const override
Definition DebugInlineeLinesSubsection.cpp:84
void addExtraFile(StringRef FileName)
Definition DebugInlineeLinesSubsection.cpp:108
DebugInlineeLinesSubsection(DebugChecksumsSubsection &Checksums, bool HasExtraFiles=false)
Definition DebugInlineeLinesSubsection.cpp:62
DebugSubsectionRef(DebugSubsectionKind Kind)
DebugSubsection(DebugSubsectionKind Kind)
detail::packed_endian_specific_integral< uint32_t, llvm::endianness::little, unaligned > ulittle32_t
This is an optimization pass for GlobalISel generic memory operations.
std::vector< support::ulittle32_t > ExtraFiles
InlineeSourceLineHeader Header
FixedStreamArray< support::ulittle32_t > ExtraFiles
const InlineeSourceLineHeader * Header