summaryrefslogtreecommitdiff
path: root/include/llvm/ObjectYAML
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-06-16 21:03:24 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-06-16 21:03:24 +0000
commit7c7aba6e5fef47a01a136be655b0a92cfd7090f6 (patch)
tree99ec531924f6078534b100ab9d7696abce848099 /include/llvm/ObjectYAML
parent7ab83427af0f77b59941ceba41d509d7d097b065 (diff)
Vendor import of llvm trunk r305575:vendor/llvm/llvm-trunk-r305575
Notes
svn path=/vendor/llvm/dist/; revision=320013 svn path=/vendor/llvm/llvm-trunk-r305575/; revision=320014; tag=vendor/llvm/llvm-trunk-r305575
Diffstat (limited to 'include/llvm/ObjectYAML')
-rw-r--r--include/llvm/ObjectYAML/COFFYAML.h4
-rw-r--r--include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h23
-rw-r--r--include/llvm/ObjectYAML/CodeViewYAMLTypes.h3
3 files changed, 19 insertions, 11 deletions
diff --git a/include/llvm/ObjectYAML/COFFYAML.h b/include/llvm/ObjectYAML/COFFYAML.h
index 1b5f7b00239a..719cb1acf6ef 100644
--- a/include/llvm/ObjectYAML/COFFYAML.h
+++ b/include/llvm/ObjectYAML/COFFYAML.h
@@ -16,6 +16,8 @@
#include "llvm/ADT/Optional.h"
#include "llvm/BinaryFormat/COFF.h"
+#include "llvm/ObjectYAML/CodeViewYAMLDebugSections.h"
+#include "llvm/ObjectYAML/CodeViewYAMLTypes.h"
#include "llvm/ObjectYAML/YAML.h"
namespace llvm {
@@ -56,6 +58,8 @@ namespace COFFYAML {
COFF::section Header;
unsigned Alignment = 0;
yaml::BinaryRef SectionData;
+ std::vector<CodeViewYAML::YAMLDebugSubsection> DebugS;
+ std::vector<CodeViewYAML::LeafRecord> DebugT;
std::vector<Relocation> Relocations;
StringRef Name;
Section();
diff --git a/include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h b/include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h
index faa3ed8a6c52..8180e0fc83f4 100644
--- a/include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h
+++ b/include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h
@@ -28,6 +28,8 @@ class DebugStringTableSubsectionRef;
class DebugChecksumsSubsectionRef;
class DebugStringTableSubsection;
class DebugChecksumsSubsection;
+class StringsAndChecksums;
+class StringsAndChecksumsRef;
}
namespace CodeViewYAML {
@@ -103,25 +105,24 @@ struct InlineeInfo {
struct YAMLDebugSubsection {
static Expected<YAMLDebugSubsection>
- fromCodeViewSubection(const codeview::DebugStringTableSubsectionRef &Strings,
- const codeview::DebugChecksumsSubsectionRef &Checksums,
+ fromCodeViewSubection(const codeview::StringsAndChecksumsRef &SC,
const codeview::DebugSubsectionRecord &SS);
std::shared_ptr<detail::YAMLSubsectionBase> Subsection;
};
-Expected<std::vector<std::unique_ptr<codeview::DebugSubsection>>>
+struct DebugSubsectionState {};
+
+Expected<std::vector<std::shared_ptr<codeview::DebugSubsection>>>
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);
+ const codeview::StringsAndChecksums &SC);
+
+std::vector<YAMLDebugSubsection>
+fromDebugS(ArrayRef<uint8_t> Data, const codeview::StringsAndChecksumsRef &SC);
-std::unique_ptr<codeview::DebugStringTableSubsection>
-findStringTable(ArrayRef<YAMLDebugSubsection> Sections);
+void initializeStringsAndChecksums(ArrayRef<YAMLDebugSubsection> Sections,
+ codeview::StringsAndChecksums &SC);
} // namespace CodeViewYAML
} // namespace llvm
diff --git a/include/llvm/ObjectYAML/CodeViewYAMLTypes.h b/include/llvm/ObjectYAML/CodeViewYAMLTypes.h
index 91b75aabe7a5..e97d5f92bf7f 100644
--- a/include/llvm/ObjectYAML/CodeViewYAMLTypes.h
+++ b/include/llvm/ObjectYAML/CodeViewYAMLTypes.h
@@ -41,6 +41,9 @@ struct LeafRecord {
codeview::CVType toCodeViewRecord(codeview::TypeTableBuilder &TS) const;
static Expected<LeafRecord> fromCodeViewRecord(codeview::CVType Type);
};
+
+std::vector<LeafRecord> fromDebugT(ArrayRef<uint8_t> DebugT);
+ArrayRef<uint8_t> toDebugT(ArrayRef<LeafRecord>, BumpPtrAllocator &Alloc);
} // namespace CodeViewYAML
} // namespace llvm