[lldb] Suppress persistent result when running po
Remove the persistent result variable after executing `po`. Without this change, the following behavior happens: ``` (lldb) p thing (NSObject *) $0 = 0x600000008000 (lldb) po thing <NSObject: 0x600000008000> (lldb) p thing (NSObject *) $2 = 0x600000008000 (lldb) p $1 (NSObject *) $1 = 0x600000008000 ``` Even though `po` hides the persistent result variable, it's still created - as $1 in this example. It can be accessed even though its existence is not evident. With this change, the persistent result is removed after the object description has printed. Instead, this is the behavior: ``` (lldb) p thing (NSObject *) $0 = 0x600000008000 (lldb) po thing <NSObject: 0x600000008000> (lldb) p thing (NSObject *) $1 = 0x600000008000 ``` The difference here is that the `po` doens't silently create a persistent result. Differential Revision: https://reviews.llvm.org/D144044
Loading
Please sign in to comment