[Lldb-commits] [PATCH] D56688: Make CompilerType::getBitSize() / getByteSize() return an optional result. (NFC)
Zachary Turner via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 15 11:11:43 PST 2019
zturner added inline comments.
Comment at: include/lldb/Target/ProcessStructReader.h:70
- size_t total_size = struct_type.GetByteSize(nullptr);
- lldb::DataBufferSP buffer_sp(new DataBufferHeap(total_size, 0));
+ auto total_size = struct_type.GetByteSize(nullptr);
+ if (!total_size)
> I think we shouldn't use `auto` here, although this is a minor nit and I don't feel strongly.
I actually changed my mind here. I didn't feel strongly at first because I thought this was a `uint64_t`. As I read through more of the patch, I realized it was an `Optional<uint64_t>`, which totally changes the semantics. So now I do feel more strongly
CHANGES SINCE LAST ACTION
More information about the lldb-commits