[lldb] Fix one leak in reproducer
authorFangrui Song <i@maskray.me>
Tue, 20 Apr 2021 02:39:10 +0000 (19:39 -0700)
committerFangrui Song <i@maskray.me>
Tue, 20 Apr 2021 02:39:10 +0000 (19:39 -0700)
commitcdae6d7711d621c19623ae4fbfdde9e0301260c7
tree3550486347e21aa1293b1a2cff5a96306da0345e
parentc46a88625d09a656f7be8778e0df3d8332b27346
[lldb] Fix one leak in reproducer

Use a variable of static storage duration to reference an intentionally
leaked variable. A static data area is in the GC-set of various leak
checkers.

This fixes 3 `check-lldb-shell` tests in a `-DLLVM_USE_SANITIZER={Leaks,Address}` build,
e.g. `test/Shell/Reproducer/TestHomeDir.test`

Differential Revision: https://reviews.llvm.org/D100806
lldb/tools/driver/Driver.cpp