[lldb] Implement SymbolFile::CopyType
authorAugusto Noronha <augusto2112@me.com>
Wed, 18 Jan 2023 20:22:43 +0000 (12:22 -0800)
committerAugusto Noronha <augusto2112@me.com>
Fri, 20 Jan 2023 21:02:04 +0000 (13:02 -0800)
commit901ba0fcae3651c81051fd8da2695bbc2bcb3c91
treee452276f1278f4cd6946d86f8ff867fe8ae6d2dd
parent84c6129c943135e2c32b9254f08d0a2e7b21116a
[lldb] Implement SymbolFile::CopyType

SymbolFiles should be the only point of creation of Types to ensure
that they aren't destroyed prematurely by keeping them in the
SymbolFile's TypeList. This patch hides the copy constructor of Types,
and adds a new CopyType function to SymbolFile, so Types can still be
copied safely.

Differential Revision: https://reviews.llvm.org/D142052
lldb/include/lldb/Symbol/SymbolFile.h
lldb/include/lldb/Symbol/SymbolFileOnDemand.h
lldb/include/lldb/Symbol/Type.h