[lldb] Change dwim-print to default to disabled persistent results
commit8bad4ae679df6fc7dbd016dccbd3da34206e836b
authorDave Lee <davelee.com@gmail.com>
Wed, 8 Mar 2023 21:22:00 +0000 (8 13:22 -0800)
committerDave Lee <davelee.com@gmail.com>
Wed, 15 Mar 2023 20:34:19 +0000 (15 13:34 -0700)
tree62455be48b4db75899dc5e8738d4619529aaf4c3
parent6a6994cc9bc0327aaf8b005c650ff5eb29d2bcce
[lldb] Change dwim-print to default to disabled persistent results

Change `dwim-print` to now disable persistent results by default, unless requested by
the user with the `--persistent-result` flag.

Ex:

```
(lldb) dwim-print 1 + 1
(int) 2
(lldb) dwim-print --persistent-result on -- 1 + 1
(int) $0 = 2
```

Users who wish to enable persistent results can make and use an alias that includes
`--persistent-result on`.

Differential Revision: https://reviews.llvm.org/D145609
lldb/source/Commands/CommandObjectDWIMPrint.cpp
lldb/source/Commands/CommandObjectExpression.cpp
lldb/source/Commands/CommandObjectExpression.h
lldb/test/API/commands/dwim-print/TestDWIMPrint.py