]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h
Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304460, and update
[FreeBSD/FreeBSD.git] / contrib / llvm / include / llvm / ObjectYAML / CodeViewYAMLDebugSections.h
1 //===- CodeViewYAMLDebugSections.h - CodeView YAMLIO debug sections -------===//
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 //
10 // This file defines classes for handling the YAML representation of CodeView
11 // Debug Info.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_OBJECTYAML_CODEVIEWYAMLDEBUGSECTIONS_H
16 #define LLVM_OBJECTYAML_CODEVIEWYAMLDEBUGSECTIONS_H
17
18 #include "llvm/DebugInfo/CodeView/CodeView.h"
19 #include "llvm/DebugInfo/CodeView/DebugSubsection.h"
20 #include "llvm/ObjectYAML/YAML.h"
21
22 namespace llvm {
23 namespace CodeViewYAML {
24 namespace detail {
25 struct C13FragmentBase;
26 }
27
28 struct SourceLineEntry {
29   uint32_t Offset;
30   uint32_t LineStart;
31   uint32_t EndDelta;
32   bool IsStatement;
33 };
34
35 struct SourceColumnEntry {
36   uint16_t StartColumn;
37   uint16_t EndColumn;
38 };
39
40 struct SourceLineBlock {
41   StringRef FileName;
42   std::vector<SourceLineEntry> Lines;
43   std::vector<SourceColumnEntry> Columns;
44 };
45
46 struct HexFormattedString {
47   std::vector<uint8_t> Bytes;
48 };
49
50 struct SourceFileChecksumEntry {
51   StringRef FileName;
52   codeview::FileChecksumKind Kind;
53   HexFormattedString ChecksumBytes;
54 };
55
56 struct SourceLineInfo {
57   uint32_t RelocOffset;
58   uint32_t RelocSegment;
59   codeview::LineFlags Flags;
60   uint32_t CodeSize;
61
62   std::vector<SourceLineBlock> Blocks;
63 };
64
65 struct InlineeSite {
66   uint32_t Inlinee;
67   StringRef FileName;
68   uint32_t SourceLineNum;
69   std::vector<StringRef> ExtraFiles;
70 };
71
72 struct InlineeInfo {
73   bool HasExtraFiles;
74   std::vector<InlineeSite> Sites;
75 };
76
77 struct SourceFileInfo {
78   std::vector<SourceFileChecksumEntry> FileChecksums;
79   std::vector<SourceLineInfo> LineFragments;
80   std::vector<InlineeInfo> Inlinees;
81 };
82
83 struct C13DebugSection {
84   std::vector<detail::C13FragmentBase> Fragments;
85 };
86 } // namespace CodeViewYAML
87 } // namespace llvm
88
89 LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::SourceFileInfo)
90
91 #endif