summaryrefslogtreecommitdiff
path: root/include/llvm/ObjectYAML
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/ObjectYAML')
-rw-r--r--include/llvm/ObjectYAML/COFFYAML.h2
-rw-r--r--include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h32
-rw-r--r--include/llvm/ObjectYAML/CodeViewYAMLTypes.h5
-rw-r--r--include/llvm/ObjectYAML/DWARFYAML.h14
-rw-r--r--include/llvm/ObjectYAML/ELFYAML.h2
-rw-r--r--include/llvm/ObjectYAML/MachOYAML.h8
-rw-r--r--include/llvm/ObjectYAML/WasmYAML.h2
7 files changed, 49 insertions, 16 deletions
diff --git a/include/llvm/ObjectYAML/COFFYAML.h b/include/llvm/ObjectYAML/COFFYAML.h
index 65ad1dde67f52..1b5f7b00239a4 100644
--- a/include/llvm/ObjectYAML/COFFYAML.h
+++ b/include/llvm/ObjectYAML/COFFYAML.h
@@ -15,8 +15,8 @@
#define LLVM_OBJECTYAML_COFFYAML_H
#include "llvm/ADT/Optional.h"
+#include "llvm/BinaryFormat/COFF.h"
#include "llvm/ObjectYAML/YAML.h"
-#include "llvm/Support/COFF.h"
namespace llvm {
diff --git a/include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h b/include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h
index a6d4d404415f5..faa3ed8a6c52c 100644
--- a/include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h
+++ b/include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h
@@ -26,6 +26,8 @@ namespace codeview {
class DebugStringTableSubsection;
class DebugStringTableSubsectionRef;
class DebugChecksumsSubsectionRef;
+class DebugStringTableSubsection;
+class DebugChecksumsSubsection;
}
namespace CodeViewYAML {
@@ -33,6 +35,23 @@ namespace detail {
struct YAMLSubsectionBase;
}
+struct YAMLFrameData {
+ uint32_t RvaStart;
+ uint32_t CodeSize;
+ uint32_t LocalSize;
+ uint32_t ParamsSize;
+ uint32_t MaxStackSize;
+ StringRef FrameFunc;
+ uint32_t PrologSize;
+ uint32_t SavedRegsSize;
+ uint32_t Flags;
+};
+
+struct YAMLCrossModuleImport {
+ StringRef ModuleName;
+ std::vector<uint32_t> ImportIds;
+};
+
struct SourceLineEntry {
uint32_t Offset;
uint32_t LineStart;
@@ -92,8 +111,17 @@ struct YAMLDebugSubsection {
};
Expected<std::vector<std::unique_ptr<codeview::DebugSubsection>>>
-convertSubsectionList(ArrayRef<YAMLDebugSubsection> Subsections,
- codeview::DebugStringTableSubsection &Strings);
+toCodeViewSubsectionList(BumpPtrAllocator &Allocator,
+ ArrayRef<YAMLDebugSubsection> Subsections,
+ codeview::DebugStringTableSubsection &Strings);
+Expected<std::vector<std::unique_ptr<codeview::DebugSubsection>>>
+toCodeViewSubsectionList(
+ BumpPtrAllocator &Allocator, ArrayRef<YAMLDebugSubsection> Subsections,
+ std::unique_ptr<codeview::DebugStringTableSubsection> &TakeStrings,
+ codeview::DebugStringTableSubsection *StringsRef);
+
+std::unique_ptr<codeview::DebugStringTableSubsection>
+findStringTable(ArrayRef<YAMLDebugSubsection> Sections);
} // namespace CodeViewYAML
} // namespace llvm
diff --git a/include/llvm/ObjectYAML/CodeViewYAMLTypes.h b/include/llvm/ObjectYAML/CodeViewYAMLTypes.h
index a57ada34a4fa6..91b75aabe7a55 100644
--- a/include/llvm/ObjectYAML/CodeViewYAMLTypes.h
+++ b/include/llvm/ObjectYAML/CodeViewYAMLTypes.h
@@ -18,8 +18,12 @@
#include "llvm/DebugInfo/CodeView/CodeView.h"
#include "llvm/DebugInfo/CodeView/TypeRecord.h"
#include "llvm/ObjectYAML/YAML.h"
+#include "llvm/Support/Allocator.h"
namespace llvm {
+namespace codeview {
+class TypeTableBuilder;
+}
namespace CodeViewYAML {
namespace detail {
struct LeafRecordBase;
@@ -34,6 +38,7 @@ struct LeafRecord {
std::shared_ptr<detail::LeafRecordBase> Leaf;
codeview::CVType toCodeViewRecord(BumpPtrAllocator &Allocator) const;
+ codeview::CVType toCodeViewRecord(codeview::TypeTableBuilder &TS) const;
static Expected<LeafRecord> fromCodeViewRecord(codeview::CVType Type);
};
} // namespace CodeViewYAML
diff --git a/include/llvm/ObjectYAML/DWARFYAML.h b/include/llvm/ObjectYAML/DWARFYAML.h
index 3f39cfc7bb3d7..75e9112e121af 100644
--- a/include/llvm/ObjectYAML/DWARFYAML.h
+++ b/include/llvm/ObjectYAML/DWARFYAML.h
@@ -16,8 +16,8 @@
#ifndef LLVM_OBJECTYAML_DWARFYAML_H
#define LLVM_OBJECTYAML_DWARFYAML_H
+#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/ObjectYAML/YAML.h"
-#include "llvm/Support/Dwarf.h"
namespace llvm {
namespace DWARFYAML {
@@ -241,7 +241,7 @@ template <> struct MappingTraits<DWARFYAML::InitialLength> {
template <> struct ScalarEnumerationTraits<dwarf::Tag> {
static void enumeration(IO &io, dwarf::Tag &value) {
-#include "llvm/Support/Dwarf.def"
+#include "llvm/BinaryFormat/Dwarf.def"
io.enumFallback<Hex16>(value);
}
};
@@ -251,7 +251,7 @@ template <> struct ScalarEnumerationTraits<dwarf::Tag> {
template <> struct ScalarEnumerationTraits<dwarf::LineNumberOps> {
static void enumeration(IO &io, dwarf::LineNumberOps &value) {
-#include "llvm/Support/Dwarf.def"
+#include "llvm/BinaryFormat/Dwarf.def"
io.enumFallback<Hex8>(value);
}
};
@@ -261,7 +261,7 @@ template <> struct ScalarEnumerationTraits<dwarf::LineNumberOps> {
template <> struct ScalarEnumerationTraits<dwarf::LineNumberExtendedOps> {
static void enumeration(IO &io, dwarf::LineNumberExtendedOps &value) {
-#include "llvm/Support/Dwarf.def"
+#include "llvm/BinaryFormat/Dwarf.def"
io.enumFallback<Hex16>(value);
}
};
@@ -271,7 +271,7 @@ template <> struct ScalarEnumerationTraits<dwarf::LineNumberExtendedOps> {
template <> struct ScalarEnumerationTraits<dwarf::Attribute> {
static void enumeration(IO &io, dwarf::Attribute &value) {
-#include "llvm/Support/Dwarf.def"
+#include "llvm/BinaryFormat/Dwarf.def"
io.enumFallback<Hex16>(value);
}
};
@@ -281,7 +281,7 @@ template <> struct ScalarEnumerationTraits<dwarf::Attribute> {
template <> struct ScalarEnumerationTraits<dwarf::Form> {
static void enumeration(IO &io, dwarf::Form &value) {
-#include "llvm/Support/Dwarf.def"
+#include "llvm/BinaryFormat/Dwarf.def"
io.enumFallback<Hex16>(value);
}
};
@@ -291,7 +291,7 @@ template <> struct ScalarEnumerationTraits<dwarf::Form> {
template <> struct ScalarEnumerationTraits<dwarf::UnitType> {
static void enumeration(IO &io, dwarf::UnitType &value) {
-#include "llvm/Support/Dwarf.def"
+#include "llvm/BinaryFormat/Dwarf.def"
io.enumFallback<Hex8>(value);
}
};
diff --git a/include/llvm/ObjectYAML/ELFYAML.h b/include/llvm/ObjectYAML/ELFYAML.h
index 81a4ec28c94fa..9d62ec27ad31a 100644
--- a/include/llvm/ObjectYAML/ELFYAML.h
+++ b/include/llvm/ObjectYAML/ELFYAML.h
@@ -16,8 +16,8 @@
#ifndef LLVM_OBJECTYAML_ELFYAML_H
#define LLVM_OBJECTYAML_ELFYAML_H
+#include "llvm/BinaryFormat/ELF.h"
#include "llvm/ObjectYAML/YAML.h"
-#include "llvm/Support/ELF.h"
namespace llvm {
namespace ELFYAML {
diff --git a/include/llvm/ObjectYAML/MachOYAML.h b/include/llvm/ObjectYAML/MachOYAML.h
index ae858c8f4aafd..59aca9a1ddf2c 100644
--- a/include/llvm/ObjectYAML/MachOYAML.h
+++ b/include/llvm/ObjectYAML/MachOYAML.h
@@ -16,9 +16,9 @@
#ifndef LLVM_OBJECTYAML_MACHOYAML_H
#define LLVM_OBJECTYAML_MACHOYAML_H
-#include "llvm/ObjectYAML/YAML.h"
+#include "llvm/BinaryFormat/MachO.h"
#include "llvm/ObjectYAML/DWARFYAML.h"
-#include "llvm/Support/MachO.h"
+#include "llvm/ObjectYAML/YAML.h"
namespace llvm {
namespace MachOYAML {
@@ -209,7 +209,7 @@ template <> struct MappingTraits<MachO::build_tool_version> {
template <> struct ScalarEnumerationTraits<MachO::LoadCommandType> {
static void enumeration(IO &io, MachO::LoadCommandType &value) {
-#include "llvm/Support/MachO.def"
+#include "llvm/BinaryFormat/MachO.def"
io.enumFallback<Hex32>(value);
}
};
@@ -278,7 +278,7 @@ template <> struct ScalarTraits<uuid_t> {
static void mapping(IO &IO, MachO::LCStruct &LoadCommand); \
};
-#include "llvm/Support/MachO.def"
+#include "llvm/BinaryFormat/MachO.def"
// Extra structures used by load commands
template <> struct MappingTraits<MachO::dylib> {
diff --git a/include/llvm/ObjectYAML/WasmYAML.h b/include/llvm/ObjectYAML/WasmYAML.h
index 7b70c9537827a..447dbd7a603da 100644
--- a/include/llvm/ObjectYAML/WasmYAML.h
+++ b/include/llvm/ObjectYAML/WasmYAML.h
@@ -16,8 +16,8 @@
#ifndef LLVM_OBJECTYAML_WASMYAML_H
#define LLVM_OBJECTYAML_WASMYAML_H
+#include "llvm/BinaryFormat/Wasm.h"
#include "llvm/ObjectYAML/YAML.h"
-#include "llvm/Support/Wasm.h"
namespace llvm {
namespace WasmYAML {