An error occurred while fetching folder content.
Dave Lee
authored
The `v` (`frame variable`) command can directly access ivars/fields of `this` or `self`. Such as `v field`, instead of `v this->field`. This change relaxes the criteria for finding `this`/`self` variables. There are cases where a `this`/`self` variable does exist, but up to now the `v` command has not made use of it. The user would have to explicitly run `v this->field` or `self->_ivar` to access ivars. This change allows such cases to also work (without explicitly dereferencing `this`/`self`). A very common example in Objective-C (and Swift) is weakly capturing `self`: ``` __weak Type *weakSelf = self; void (^block)(void) = ^{ Type *self = weakSelf; // Re-establish strong reference. // `v _ivar` should work just as well as `v self->_ivar`. }; ``` In this case, `self` exists but `v` would not have used it. With this change, the fact that a variable named `self` exists is enough for it to be used. Differential Revision: https://reviews.llvm.org/D145276
Name | Last commit | Last update |
---|