llvm-project/lldb/unittests
Pavel Labath d8aca8886f Make UniqueCStringMap work with non-default-constructible types and other improvements/cleanups
Summary:
The motivation for this was me wanting to make the validity of dwarf
DIERefs explicit (via llvm::Optional<DIERef>). This meant that the class
would no longer have a default constructor. As the DIERef was being
stored in a UniqueCStringMap, this meant that this container (like all
standard containers) needed to work with non-default-constructible types
too.

This part is achieved by removing the default constructors for the map
entry types, and providing appropriate comparison overloads so that we
can search for map entries without constructing a dummy entry. While
doing that, I took the opportunity to modernize the code, and add some
tests. Functions that were completely unused are deleted.

This required also some changes in the Symtab code, as it was default
constructing map entries, which was not impossible even though its
value type was default-constructible. Technically, these changes could
be avoided with some SFINAE on the entry type, but I felt that the code
is cleaner this way anyway.

Reviewers: JDevlieghere, sgraenitz

Subscribers: mgorny, aprantl, lldb-commits

Differential Revision: https://reviews.llvm.org/D63268

llvm-svn: 363357
2019-06-14 06:33:31 +00:00
..
Breakpoint Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Core Make UniqueCStringMap work with non-default-constructible types and other improvements/cleanups 2019-06-14 06:33:31 +00:00
Disassembler When disassembling Aarch64 target and vendor Apple, set the cpu to 2019-03-07 03:16:45 +00:00
Editline C.128 override, virtual keyword handling 2019-05-03 10:03:28 +00:00
Expression DWARFExpression: Fix implementation of DW_OP_pick 2019-04-29 10:55:22 +00:00
Host Make ConnectionFileDescription work with all sockets 2019-05-30 23:30:35 +00:00
Interpreter Include inlined functions when figuring out a contiguous address range 2019-05-06 20:01:21 +00:00
Language Make CPlusPlusNameParser robust against nullptr StringRefs. 2019-05-31 00:18:42 +00:00
ObjectFile Include inlined functions when figuring out a contiguous address range 2019-05-06 20:01:21 +00:00
Platform Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Process Create a generic handler for Xfer packets 2019-06-10 20:59:58 +00:00
ScriptInterpreter [CMake] Only the Python scirpt interpreter should link against Python. 2019-04-01 22:03:04 +00:00
Signals Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Symbol Fixup r360161 2019-05-07 16:13:10 +00:00
SymbolFile Fix some signed/unsigned comparison warnings 2019-06-07 09:43:53 +00:00
Target C.128 override, virtual keyword handling 2019-05-03 10:03:28 +00:00
TestingSupport Fix file names in file headers. NFC 2019-05-13 04:42:32 +00:00
UnwindAssembly Add support for mid-function epilogues on x86 that end in a non-local jump. 2019-06-03 22:34:12 +00:00
Utility [Reproducers] Simplify providers with nested Info struct (NFC) 2019-06-12 22:17:38 +00:00
debugserver [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
tools [lldb-server unittest] Add missing teardown logic 2019-06-03 15:18:15 +00:00
CMakeLists.txt [CMake] Folder structure for generated Xcode project to cover more targets 2019-05-28 09:29:05 +00:00
gtest_common.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00