llvm-project/lldb/source/Host/common
serge-sans-paille 75e164f61d [llvm] Cleanup header dependencies in ADT and Support
The cleanup was manual, but assisted by "include-what-you-use". It consists in

1. Removing unused forward declaration. No impact expected.
2. Removing unused headers in .cpp files. No impact expected.
3. Removing unused headers in .h files. This removes implicit dependencies and
   is generally considered a good thing, but this may break downstream builds.
   I've updated llvm, clang, lld, lldb and mlir deps, and included a list of the
   modification in the second part of the commit.
4. Replacing header inclusion by forward declaration. This has the same impact
   as 3.

Notable changes:

- llvm/Support/TargetParser.h no longer includes llvm/Support/AArch64TargetParser.h nor llvm/Support/ARMTargetParser.h
- llvm/Support/TypeSize.h no longer includes llvm/Support/WithColor.h
- llvm/Support/YAMLTraits.h no longer includes llvm/Support/Regex.h
- llvm/ADT/SmallVector.h no longer includes llvm/Support/MemAlloc.h nor llvm/Support/ErrorHandling.h

You may need to add some of these headers in your compilation units, if needs be.

As an hint to the impact of the cleanup, running

clang++ -E  -Iinclude -I../llvm/include ../llvm/lib/Support/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l

before: 8000919 lines
after:  7917500 lines

Reduced dependencies also helps incremental rebuilds and is more ccache
friendly, something not shown by the above metric :-)

Discourse thread on the topic: https://llvm.discourse.group/t/include-what-you-use-include-cleanup/5831
2022-01-21 13:54:49 +01:00
..
Editline.cpp [lldb] Fix a stray array access in Editline 2021-10-04 14:26:02 +02:00
File.cpp [lldb] Support serial port parity checking 2021-10-25 10:51:46 +02:00
FileAction.cpp [lldb] Use C++11 default member initializers 2021-06-09 09:43:13 -07:00
FileCache.cpp
FileSystem.cpp Added the ability to cache the finalized symbol tables subsequent debug sessions to start faster. 2021-12-16 09:59:55 -08:00
GetOptInc.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
Host.cpp Use true/false instead of 1/0 (NFC) 2022-01-09 12:21:06 -08:00
HostInfoBase.cpp [lldb][NFC] Remove an outdated comment in HostInfoBase 2021-06-22 16:48:17 +02:00
HostNativeThreadBase.cpp [lldb] Add NOLINT(modernize-use-nullptr) 2022-01-01 13:14:59 -08:00
HostProcess.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
HostThread.cpp
LZMA.cpp
LockFileBase.cpp [lldb] Remove some anonymous namespaces 2021-10-05 08:35:18 +02:00
MainLoop.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
MonitoringProcessLauncher.cpp
NativeProcessProtocol.cpp [lldb][AArch64] Add memory tag writing to lldb-server 2021-07-27 12:02:17 +01:00
NativeRegisterContext.cpp [lldb] Support querying registers via generic names without alt_names 2021-09-13 13:05:06 +02:00
NativeThreadProtocol.cpp
NativeWatchpointList.cpp
OptionParser.cpp [lldb][NFC] Move OptionDefinition from lldb-private-types.h to its own Utility header 2020-11-12 15:30:26 +01:00
PipeBase.cpp
ProcessLaunchInfo.cpp [lldb/qemu] Add support for pty redirection 2021-12-06 15:03:21 +01:00
ProcessRunLock.cpp [lldb] Use C++11 default member initializers 2021-06-09 09:43:13 -07:00
PseudoTerminal.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
Socket.cpp [llvm] Cleanup header dependencies in ADT and Support 2022-01-21 13:54:49 +01:00
SocketAddress.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
TCPSocket.cpp [lldb] [Host/Socket] Make DecodeHostAndPort() return a dedicated struct 2021-10-28 09:57:50 +02:00
Terminal.cpp [lldb] [Host/Terminal] Fix warnings with termios disabled 2021-10-29 09:58:09 +02:00
ThreadLauncher.cpp
UDPSocket.cpp [lldb] [Host/Socket] Make DecodeHostAndPort() return a dedicated struct 2021-10-28 09:57:50 +02:00
XML.cpp [lldb] fix memory leak in "GetGDBServerRegisterInfoXMLAndProcess" 2022-01-10 14:33:09 -08:00