zturner marked an inline comment as done.
zturner added inline comments.

================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:552
+  data.Clear();
+  m_obj_file->ReadSectionData(section_sp.get(), data);
 }
----------------
clayborg wrote:
> clayborg wrote:
> > ```
> > if (m_obj_file->ReadSectionData(section_sp.get(), data) == 0)
> >   data.Clear();
> > ```
> What do you think about this one? This is my last nit
I did see that one, but I was having trouble figuring out how the behavior is 
different from what I already wrote.  The only way I could see it being 
different is if `ReadSectionData` would actually write data there even when it 
failed.  That would be strange though, do you know if it can happen?

The way I wrote it, it clears first, and then if the function fails / returns 
0, I would expect it to be unchanged.

Happy to change it if there's actually a difference I'm overlooking, but if 
they're the same then I think the branchless version is slightly easier to read.


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

https://reviews.llvm.org/D59562



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to