[PATCH] D89120: [lib/ObjectYAML] - Simplify the code that handles Content/Size fields.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 12 01:31:23 PDT 2020


jhenderson added inline comments.


================
Comment at: llvm/lib/ObjectYAML/ELFEmitter.cpp:1303-1304
     ContiguousBlobAccumulator &CBA) {
-  if (Section.Content || Section.Size) {
-    SHeader.sh_size = writeContent(CBA, Section.Content, Section.Size);
+  if (!Section.Entries)
     return;
 
----------------
I can see why this is needed, but why wasn't it needed before, and what's the impact of adding it? Same applies in a few other places too.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89120/new/

https://reviews.llvm.org/D89120



More information about the llvm-commits mailing list