summaryrefslogtreecommitdiff
path: root/lib/ObjectYAML
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-06-20 20:34:37 +0000
committerReid Kleckner <rnk@google.com>2017-06-20 20:34:37 +0000
commitd3be377704816250bc282e4b201593fb690dd30c (patch)
tree9bf93436ecd882c35e59b3c930338fcfa39f8339 /lib/ObjectYAML
parent64373efcabd901d75cd153b8a4bf2621ec0049db (diff)
[codeview] Fully initialize DataSym when mapping from YAML
In the object file, the section index and relative offset are typically zero, so make these YAML fields optional with a default. It looks like there may be more partially initialized symbol records, but this should fix the msan bot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305842 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ObjectYAML')
-rw-r--r--lib/ObjectYAML/CodeViewYAMLSymbols.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ObjectYAML/CodeViewYAMLSymbols.cpp b/lib/ObjectYAML/CodeViewYAMLSymbols.cpp
index 2f78676c6c8..edabe415fd0 100644
--- a/lib/ObjectYAML/CodeViewYAMLSymbols.cpp
+++ b/lib/ObjectYAML/CodeViewYAMLSymbols.cpp
@@ -489,6 +489,8 @@ template <> void SymbolRecordImpl<ConstantSym>::map(IO &IO) {
template <> void SymbolRecordImpl<DataSym>::map(IO &IO) {
// TODO: Map linkage name
IO.mapRequired("Type", Symbol.Type);
+ IO.mapOptional("DataOffset", Symbol.DataOffset, 0U);
+ IO.mapOptional("Segment", Symbol.Segment, uint16_t(0));
IO.mapRequired("DisplayName", Symbol.Name);
}