[Lldb-commits] [PATCH] D61146: Set a CXXRecordDecl to not be passed in registers if DW_CC_pass_by_reference when loading from DWARF

Shafik Yaghmour via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 30 13:24:45 PDT 2019


shafik added inline comments.


================
Comment at: packages/Python/lldbsuite/test/expression_command/argument_passing_restrictions/main.cpp:22
+      bounds.y = 2;
+      return;
+    }
----------------
aprantl wrote:
> what's the point of the return?
This is vestigial return left over from when the reproducer was more complex.


================
Comment at: packages/Python/lldbsuite/test/expression_command/argument_passing_restrictions/main.cpp:40
+    return Shape::empty_shape()->bounds().x; // break here
+}
----------------
teemperor wrote:
> Some small things:
> 1. I think the source here is not clang-formatted :)
> 2. It's not really clear to me if Shape or Bounds are supposed to have arg passing restrictions (or both?). Maybe rename them or comment this in the source. E.g. `// supposed to be passed by ref/value`.
> 3. Can this test be more minimized? Do we need both x and y as member variables? Do we need all these methods and variables? Especially when debug stepping through this test case at some point a minimized test case is always nicer.
I am adding comments to the code to try to address what it is trying to catch.

I have tried to simplify as much as possible but the scenario is rather elaborate. 

I don't need both `x` and `y` though.


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

https://reviews.llvm.org/D61146





More information about the lldb-commits mailing list