[Lldb-commits] [PATCH] D67369: Implement DW_OP_convert

2019-09-11 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. The yaml object file is pretty impressive, but I am wondering if it is really necessary. Have you looked if it would be possible to reuse the existing `TestFile::fromYaml` functionality? I think it should be possible to reuse that by just inserting some MachO yaml

[Lldb-commits] [PATCH] D67369: Implement DW_OP_convert

2019-09-10 Thread Phabricator via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL371532: Implement DW_OP_convert (authored by adrian, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[Lldb-commits] [PATCH] D67369: Implement DW_OP_convert

2019-09-10 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl marked 5 inline comments as done. aprantl added inline comments. Comment at: lldb/source/Expression/DWARFExpression.cpp:2571 + if (stack.size() < 1) { +if (error_ptr) + error_ptr->SetErrorString( vsk wrote: > JDevlieghere wrote: > >

[Lldb-commits] [PATCH] D67369: Implement DW_OP_convert

2019-09-10 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl marked an inline comment as done. aprantl added inline comments. Comment at: lldb/include/lldb/Utility/Scalar.h:107 + /// Return the most efficient Scalar::Type for the requested size. + static Type GetBestType(size_t bit_size, bool sign); + vsk wrote:

[Lldb-commits] [PATCH] D67369: Implement DW_OP_convert

2019-09-09 Thread Vedant Kumar via Phabricator via lldb-commits
vsk added a comment. Looks good overall, especially the testing. Comment at: lldb/include/lldb/Utility/Scalar.h:107 + /// Return the most efficient Scalar::Type for the requested size. + static Type GetBestType(size_t bit_size, bool sign); + JDevlieghere

[Lldb-commits] [PATCH] D67369: Implement DW_OP_convert

2019-09-09 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added inline comments. Comment at: lldb/source/Expression/DWARFExpression.cpp:2571 + if (stack.size() < 1) { +if (error_ptr) + error_ptr->SetErrorString( aprantl wrote: > JDevlieghere wrote: > > Can we wrap this in a lambda? >

[Lldb-commits] [PATCH] D67369: Implement DW_OP_convert

2019-09-09 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl marked an inline comment as done. aprantl added inline comments. Comment at: lldb/source/Expression/DWARFExpression.cpp:2571 + if (stack.size() < 1) { +if (error_ptr) + error_ptr->SetErrorString( JDevlieghere wrote: > Can we wrap

[Lldb-commits] [PATCH] D67369: Implement DW_OP_convert

2019-09-09 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added inline comments. Comment at: lldb/include/lldb/Utility/Scalar.h:107 + /// Return the most efficient Scalar::Type for the requested size. + static Type GetBestType(size_t bit_size, bool sign); + How about `GetTypeForBitSize`?

[Lldb-commits] [PATCH] D67369: Implement DW_OP_convert

2019-09-09 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl marked an inline comment as done. aprantl added inline comments. Comment at: lldb/source/Utility/Scalar.cpp:423 +if (bit_size <= sizeof(int)*8) return Scalar::e_sint; +if (bit_size <= sizeof(long)*8) return Scalar::e_slong; +if (bit_size <= sizeof(long

[Lldb-commits] [PATCH] D67369: Implement DW_OP_convert

2019-09-09 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl marked an inline comment as done. aprantl added inline comments. Comment at: lldb/source/Utility/Scalar.cpp:423 +if (bit_size <= sizeof(int)*8) return Scalar::e_sint; +if (bit_size <= sizeof(long)*8) return Scalar::e_slong; +if (bit_size <= sizeof(long

[Lldb-commits] [PATCH] D67369: Implement DW_OP_convert

2019-09-09 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. This revision is now accepted and ready to land. LGTM, nice job with the test case, I see myself copying that in the future. :) Comment at: lldb/source/Utility/Scalar.cpp:423 +if (bit_size <= sizeof(int)*8)

[Lldb-commits] [PATCH] D67369: Implement DW_OP_convert

2019-09-09 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl created this revision. aprantl added reviewers: jasonmolenda, davide, labath, clayborg. Herald added a project: LLDB. aprantl added a reviewer: jakubjelinek. This patch adds basic support for DW_OP_convert[1] for integer types. Recent versions of LLVM's optimizer may insert this opcode