aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectThread.cpp
diff options
context:
space:
mode:
authorGuozhi Wei <carrot@google.com>2022-08-16 22:06:50 +0000
committerGuozhi Wei <carrot@google.com>2022-08-16 22:06:50 +0000
commitb217a78720f10ed739c39a2d74a54ef492a4cd29 (patch)
tree7a0e432e9d7352b1ee2942f29df3ab2020b77029 /lldb/source/Commands/CommandObjectThread.cpp
parentb5a18de65169b4aa54db0b0ebc3dcc3462570600 (diff)
downloadllvm-b217a78720f10ed739c39a2d74a54ef492a4cd29.zip
llvm-b217a78720f10ed739c39a2d74a54ef492a4cd29.tar.gz
llvm-b217a78720f10ed739c39a2d74a54ef492a4cd29.tar.bz2
[unittests/CodeGen] Remove unique_ptr from the result of createTargetMachine
The object contained in unique_ptr will be automatically deleted at the end of the current scope. In createMachineFunction, auto TM = createTargetMachine(); creates a TM contained in unique_ptr, a reference of the TM is stored in a MachineFunction object, but at the end of the function, the TM is deleted, so later access to the TM(and contained STI, TRI ...) through MachineFunction object is invalid. So we should not use unique_ptr<BogusTargetMachine> in functions createMachineFunction and createTargetMachine. Differential Revision: https://reviews.llvm.org/D131790
Diffstat (limited to 'lldb/source/Commands/CommandObjectThread.cpp')
0 files changed, 0 insertions, 0 deletions