aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp
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
commit665e1c9240a71463b492f57515cb5ae1aa8237eb (patch)
tree7517fd2cc271dbbaa8e997cdd94d40beb96e60a4 /llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp
parent324568f90908cff125281f1bdc9b68dbfeb6e003 (diff)
downloadllvm-665e1c9240a71463b492f57515cb5ae1aa8237eb.zip
llvm-665e1c9240a71463b492f57515cb5ae1aa8237eb.tar.gz
llvm-665e1c9240a71463b492f57515cb5ae1aa8237eb.tar.bz2
[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. llvm-svn: 305842
Diffstat (limited to 'llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp')
-rw-r--r--llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp b/llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp
index 2f78676..edabe41 100644
--- a/llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp
+++ b/llvm/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);
}