summaryrefslogtreecommitdiff
path: root/include/llvm/ObjectYAML
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-06-03 15:20:36 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-06-03 15:20:36 +0000
commitd288ef4c1788d3a951a7558c68312c2d320612b1 (patch)
treeece909a5200f95f85f0813599a9500620f4d9217 /include/llvm/ObjectYAML
parentf382538d471e38a9b98f016c4caebd24c8d60b62 (diff)
Notes
Diffstat (limited to 'include/llvm/ObjectYAML')
-rw-r--r--include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h32
-rw-r--r--include/llvm/ObjectYAML/CodeViewYAMLSymbols.h4
2 files changed, 26 insertions, 10 deletions
diff --git a/include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h b/include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h
index 6ddae2e2b41c0..a6d4d404415f5 100644
--- a/include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h
+++ b/include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h
@@ -17,12 +17,20 @@
#include "llvm/DebugInfo/CodeView/CodeView.h"
#include "llvm/DebugInfo/CodeView/DebugSubsection.h"
+#include "llvm/DebugInfo/CodeView/DebugSubsectionRecord.h"
#include "llvm/ObjectYAML/YAML.h"
namespace llvm {
+
+namespace codeview {
+class DebugStringTableSubsection;
+class DebugStringTableSubsectionRef;
+class DebugChecksumsSubsectionRef;
+}
namespace CodeViewYAML {
+
namespace detail {
-struct C13FragmentBase;
+struct YAMLSubsectionBase;
}
struct SourceLineEntry {
@@ -74,18 +82,24 @@ struct InlineeInfo {
std::vector<InlineeSite> Sites;
};
-struct SourceFileInfo {
- std::vector<SourceFileChecksumEntry> FileChecksums;
- std::vector<SourceLineInfo> LineFragments;
- std::vector<InlineeInfo> Inlinees;
-};
+struct YAMLDebugSubsection {
+ static Expected<YAMLDebugSubsection>
+ fromCodeViewSubection(const codeview::DebugStringTableSubsectionRef &Strings,
+ const codeview::DebugChecksumsSubsectionRef &Checksums,
+ const codeview::DebugSubsectionRecord &SS);
-struct C13DebugSection {
- std::vector<detail::C13FragmentBase> Fragments;
+ std::shared_ptr<detail::YAMLSubsectionBase> Subsection;
};
+
+Expected<std::vector<std::unique_ptr<codeview::DebugSubsection>>>
+convertSubsectionList(ArrayRef<YAMLDebugSubsection> Subsections,
+ codeview::DebugStringTableSubsection &Strings);
+
} // namespace CodeViewYAML
} // namespace llvm
-LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::SourceFileInfo)
+LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::YAMLDebugSubsection)
+
+LLVM_YAML_IS_SEQUENCE_VECTOR(CodeViewYAML::YAMLDebugSubsection)
#endif
diff --git a/include/llvm/ObjectYAML/CodeViewYAMLSymbols.h b/include/llvm/ObjectYAML/CodeViewYAMLSymbols.h
index ee4e2ac9d404c..9b411e8b074fc 100644
--- a/include/llvm/ObjectYAML/CodeViewYAMLSymbols.h
+++ b/include/llvm/ObjectYAML/CodeViewYAMLSymbols.h
@@ -28,7 +28,9 @@ struct SymbolRecordBase;
struct SymbolRecord {
std::shared_ptr<detail::SymbolRecordBase> Symbol;
- codeview::CVSymbol toCodeViewSymbol(BumpPtrAllocator &Allocator) const;
+ codeview::CVSymbol
+ toCodeViewSymbol(BumpPtrAllocator &Allocator,
+ codeview::CodeViewContainer Container) const;
static Expected<SymbolRecord> fromCodeViewSymbol(codeview::CVSymbol Symbol);
};