llvm-project/lldb/tools/lldb-test
Pavel Labath 38870af859 [lldb] Remove FileSpec->CompileUnit inheritance
Summary:
CompileUnit is a complicated class. Having it be implicitly convertible
to a FileSpec makes reasoning about it even harder.

This patch replaces the inheritance by a simple member and an accessor
function. This avoid the need for casting in places where one needed to
force a CompileUnit to be treated as a FileSpec, and does not add much
verbosity elsewhere.

It also fixes a bug where we were wrongly comparing CompileUnit& and a
CompileUnit*, which compiled due to a combination of this inheritance
and the FileSpec*->FileSpec implicit constructor.

Reviewers: teemperor, JDevlieghere, jdoerfert

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D70827
2019-11-29 11:44:45 +01:00
..
CMakeLists.txt SystemInitializer: Use Targets.def to selectively initialize ABI plugins 2019-09-26 09:47:32 +00:00
FormatUtil.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatUtil.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SystemInitializerTest.cpp SystemInitializer: Define macros for experimental targets too 2019-09-26 17:15:18 +00:00
SystemInitializerTest.h [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
lldb-test.cpp [lldb] Remove FileSpec->CompileUnit inheritance 2019-11-29 11:44:45 +01:00