[llvm] r305842 - [codeview] Fully initialize DataSym when mapping from YAML
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 20 13:34:37 PDT 2017
Author: rnk
Date: Tue Jun 20 15:34:37 2017
New Revision: 305842
URL: http://llvm.org/viewvc/llvm-project?rev=305842&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/ObjectYAML/CodeViewYAMLSymbols.cpp
Modified: llvm/trunk/lib/ObjectYAML/CodeViewYAMLSymbols.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ObjectYAML/CodeViewYAMLSymbols.cpp?rev=305842&r1=305841&r2=305842&view=diff
==============================================================================
--- llvm/trunk/lib/ObjectYAML/CodeViewYAMLSymbols.cpp (original)
+++ llvm/trunk/lib/ObjectYAML/CodeViewYAMLSymbols.cpp Tue Jun 20 15:34:37 2017
@@ -489,6 +489,8 @@ template <> void SymbolRecordImpl<Consta
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);
}
More information about the llvm-commits
mailing list