From a69be8fb50d920fdf909ae7875d9ca24a56f741a Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Tue, 20 Jun 2017 20:34:37 +0000 Subject: [PATCH] [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 --- lib/ObjectYAML/CodeViewYAMLSymbols.cpp | 2 ++ 1 file changed, 2 insertions(+) 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::map(IO &IO) { template <> void SymbolRecordImpl::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); }