[lldb] Move Core/FileSpecList -> Utility/FileSpecList (NFC)
authorJonas Devlieghere <jonas@devlieghere.com>
Fri, 5 May 2023 04:52:19 +0000 (21:52 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Fri, 5 May 2023 05:00:17 +0000 (22:00 -0700)
There's no reason for FileSpecList to live in lldb/Core while FileSpec
lives in lldb/Utility. Move FileSpecList next to FileSpec.

25 files changed:
lldb/include/lldb/Core/SearchFilter.h
lldb/include/lldb/Interpreter/CommandCompletions.h
lldb/include/lldb/Interpreter/OptionValueFileSpecList.h
lldb/include/lldb/Symbol/CompileUnit.h
lldb/include/lldb/Symbol/LocateSymbolFile.h
lldb/include/lldb/Symbol/ObjectFile.h
lldb/include/lldb/Utility/FileSpecList.h [moved from lldb/include/lldb/Core/FileSpecList.h with 97% similarity]
lldb/source/API/SBFileSpecList.cpp
lldb/source/Commands/CommandCompletions.cpp
lldb/source/Core/CMakeLists.txt
lldb/source/Core/FileLineResolver.cpp
lldb/source/Core/Module.cpp
lldb/source/Core/ModuleList.cpp
lldb/source/Expression/ObjectFileJIT.cpp
lldb/source/Interpreter/CommandObject.cpp
lldb/source/Plugins/ExpressionParser/Clang/CppModuleConfiguration.h
lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
lldb/source/Utility/CMakeLists.txt
lldb/source/Utility/FileSpecList.cpp [moved from lldb/source/Core/FileSpecList.cpp with 99% similarity]
lldb/unittests/Core/FileSpecListTest.cpp

index 491e3dd..7645499 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLDB_CORE_SEARCHFILTER_H
 #define LLDB_CORE_SEARCHFILTER_H
 
-#include "lldb/Core/FileSpecList.h"
+#include "lldb/Utility/FileSpecList.h"
 #include "lldb/Utility/StructuredData.h"
 
 #include "lldb/Utility/FileSpec.h"
index c13bc49..8578782 100644 (file)
 
 #include <set>
 
-#include "lldb/Core/FileSpecList.h"
 #include "lldb/Core/SearchFilter.h"
 #include "lldb/Interpreter/Options.h"
 #include "lldb/Utility/CompletionRequest.h"
+#include "lldb/Utility/FileSpecList.h"
 #include "lldb/Utility/RegularExpression.h"
 #include "lldb/lldb-private.h"
 
index 29641c3..bda6b50 100644 (file)
@@ -11,8 +11,8 @@
 
 #include <mutex>
 
-#include "lldb/Core/FileSpecList.h"
 #include "lldb/Interpreter/OptionValue.h"
+#include "lldb/Utility/FileSpecList.h"
 
 namespace lldb_private {
 
index 44e1d67..229ee2d 100644 (file)
@@ -9,13 +9,13 @@
 #ifndef LLDB_SYMBOL_COMPILEUNIT_H
 #define LLDB_SYMBOL_COMPILEUNIT_H
 
-#include "lldb/Core/FileSpecList.h"
 #include "lldb/Core/ModuleChild.h"
 #include "lldb/Core/SourceLocationSpec.h"
 #include "lldb/Symbol/DebugMacros.h"
 #include "lldb/Symbol/Function.h"
 #include "lldb/Symbol/LineTable.h"
 #include "lldb/Symbol/SourceModule.h"
+#include "lldb/Utility/FileSpecList.h"
 #include "lldb/Utility/Stream.h"
 #include "lldb/Utility/UserID.h"
 #include "lldb/lldb-enumerations.h"
index 6f0506e..0bf6555 100644 (file)
@@ -11,8 +11,8 @@
 
 #include <cstdint>
 
-#include "lldb/Core/FileSpecList.h"
 #include "lldb/Utility/FileSpec.h"
+#include "lldb/Utility/FileSpecList.h"
 #include "lldb/Utility/Status.h"
 #include "lldb/lldb-forward.h"
 
index 8862630..9b006df 100644 (file)
@@ -9,7 +9,6 @@
 #ifndef LLDB_SYMBOL_OBJECTFILE_H
 #define LLDB_SYMBOL_OBJECTFILE_H
 
-#include "lldb/Core/FileSpecList.h"
 #include "lldb/Core/ModuleChild.h"
 #include "lldb/Core/PluginInterface.h"
 #include "lldb/Symbol/Symtab.h"
@@ -17,6 +16,7 @@
 #include "lldb/Utility/DataExtractor.h"
 #include "lldb/Utility/Endian.h"
 #include "lldb/Utility/FileSpec.h"
+#include "lldb/Utility/FileSpecList.h"
 #include "lldb/Utility/UUID.h"
 #include "lldb/lldb-private.h"
 #include "llvm/Support/Threading.h"
similarity index 97%
rename from lldb/include/lldb/Core/FileSpecList.h
rename to lldb/include/lldb/Utility/FileSpecList.h
index a5720d8..6b88cd2 100644 (file)
@@ -8,18 +8,16 @@
 
 #ifndef LLDB_CORE_FILESPECLIST_H
 #define LLDB_CORE_FILESPECLIST_H
-#if defined(__cplusplus)
 
 #include "lldb/Utility/FileSpec.h"
 
-#include <vector>
-
 #include <cstddef>
+#include <vector>
 
 namespace lldb_private {
 class Stream;
 
-/// \class FileSpecList FileSpecList.h "lldb/Core/FileSpecList.h"
+/// \class FileSpecList FileSpecList.h "lldb/Utility/FileSpecList.h"
 /// A file collection class.
 ///
 /// A class that contains a mutable list of FileSpec objects.
@@ -84,7 +82,7 @@ public:
   ///
   /// \param[in] args
   ///     Arguments to create the FileSpec
-  template <class... Args> void EmplaceBack(Args &&... args) {
+  template <class... Args> void EmplaceBack(Args &&...args) {
     m_files.emplace_back(std::forward<Args>(args)...);
   }
 
@@ -227,5 +225,4 @@ protected:
 
 } // namespace lldb_private
 
-#endif // #if defined(__cplusplus)
 #endif // LLDB_CORE_FILESPECLIST_H
index cf81c42..74a368a 100644 (file)
@@ -10,9 +10,9 @@
 #include "Utils.h"
 #include "lldb/API/SBFileSpec.h"
 #include "lldb/API/SBStream.h"
-#include "lldb/Core/FileSpecList.h"
 #include "lldb/Host/PosixApi.h"
 #include "lldb/Utility/FileSpec.h"
+#include "lldb/Utility/FileSpecList.h"
 #include "lldb/Utility/Instrumentation.h"
 #include "lldb/Utility/Stream.h"
 
index ae1ee1f..53a3f96 100644 (file)
@@ -10,7 +10,6 @@
 #include "llvm/ADT/StringSet.h"
 
 #include "lldb/Breakpoint/Watchpoint.h"
-#include "lldb/Core/FileSpecList.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/PluginManager.h"
 #include "lldb/DataFormatters/DataVisualization.h"
@@ -27,6 +26,7 @@
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/Target/Thread.h"
 #include "lldb/Utility/FileSpec.h"
+#include "lldb/Utility/FileSpecList.h"
 #include "lldb/Utility/StreamString.h"
 #include "lldb/Utility/TildeExpressionResolver.h"
 
index f0220be..74ad455 100644 (file)
@@ -36,7 +36,6 @@ add_lldb_library(lldbCore
   DynamicLoader.cpp
   EmulateInstruction.cpp
   FileLineResolver.cpp
-  FileSpecList.cpp
   FormatEntity.cpp
   Highlighter.cpp
   IOHandler.cpp
index 612614a..7c3cf70 100644 (file)
@@ -8,10 +8,10 @@
 
 #include "lldb/Core/FileLineResolver.h"
 
-#include "lldb/Core/FileSpecList.h"
 #include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/LineTable.h"
 #include "lldb/Utility/ConstString.h"
+#include "lldb/Utility/FileSpecList.h"
 #include "lldb/Utility/Stream.h"
 
 #include <string>
index 17d8043..d527bdc 100644 (file)
@@ -12,7 +12,6 @@
 #include "lldb/Core/AddressResolverFileLine.h"
 #include "lldb/Core/DataFileCache.h"
 #include "lldb/Core/Debugger.h"
-#include "lldb/Core/FileSpecList.h"
 #include "lldb/Core/Mangled.h"
 #include "lldb/Core/ModuleSpec.h"
 #include "lldb/Core/SearchFilter.h"
@@ -39,6 +38,7 @@
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Utility/DataBufferHeap.h"
+#include "lldb/Utility/FileSpecList.h"
 #include "lldb/Utility/LLDBAssert.h"
 #include "lldb/Utility/LLDBLog.h"
 #include "lldb/Utility/Log.h"
index 5ed5bd4..39caa21 100644 (file)
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 #include "lldb/Core/ModuleList.h"
-#include "lldb/Core/FileSpecList.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleSpec.h"
 #include "lldb/Host/FileSystem.h"
@@ -22,6 +21,7 @@
 #include "lldb/Symbol/VariableList.h"
 #include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/ConstString.h"
+#include "lldb/Utility/FileSpecList.h"
 #include "lldb/Utility/LLDBLog.h"
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/UUID.h"
index 106652d..10fac9a 100644 (file)
@@ -8,7 +8,6 @@
 
 #include "llvm/ADT/StringRef.h"
 
-#include "lldb/Core/FileSpecList.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleSpec.h"
 #include "lldb/Core/PluginManager.h"
@@ -21,6 +20,7 @@
 #include "lldb/Utility/DataBuffer.h"
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/FileSpec.h"
+#include "lldb/Utility/FileSpecList.h"
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/Timer.h"
 #include "lldb/Utility/UUID.h"
index c13ce4e..313d24f 100644 (file)
 
 // These are for the Sourcename completers.
 // FIXME: Make a separate file for the completers.
-#include "lldb/Core/FileSpecList.h"
 #include "lldb/DataFormatters/FormatManager.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Utility/FileSpec.h"
+#include "lldb/Utility/FileSpecList.h"
 
 #include "lldb/Target/Language.h"
 
index 3a87570..7be0ce6 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CPPMODULECONFIGURATION_H
 #define LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CPPMODULECONFIGURATION_H
 
-#include <lldb/Core/FileSpecList.h>
+#include <lldb/Utility/FileSpecList.h>
 #include <llvm/Support/Regex.h>
 
 namespace lldb_private {
index 937d148..82171de 100644 (file)
@@ -13,7 +13,6 @@
 #include <optional>
 #include <unordered_map>
 
-#include "lldb/Core/FileSpecList.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleSpec.h"
 #include "lldb/Core/PluginManager.h"
@@ -27,6 +26,7 @@
 #include "lldb/Target/Target.h"
 #include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/DataBufferHeap.h"
+#include "lldb/Utility/FileSpecList.h"
 #include "lldb/Utility/LLDBLog.h"
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/RangeMap.h"
index 33a70e2..8ff613d 100644 (file)
@@ -14,7 +14,6 @@
 #include "Plugins/Process/Utility/RegisterContextDarwin_i386.h"
 #include "Plugins/Process/Utility/RegisterContextDarwin_x86_64.h"
 #include "lldb/Core/Debugger.h"
-#include "lldb/Core/FileSpecList.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleSpec.h"
 #include "lldb/Core/PluginManager.h"
@@ -36,6 +35,7 @@
 #include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/DataBuffer.h"
 #include "lldb/Utility/FileSpec.h"
+#include "lldb/Utility/FileSpecList.h"
 #include "lldb/Utility/LLDBLog.h"
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/RangeMap.h"
index d4f42a8..bea77c3 100644 (file)
 #define LLDB_SOURCE_PLUGINS_OBJECTFILE_MACH_O_OBJECTFILEMACHO_H
 
 #include "lldb/Core/Address.h"
-#include "lldb/Core/FileSpecList.h"
 #include "lldb/Host/SafeMachO.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Utility/FileSpec.h"
+#include "lldb/Utility/FileSpecList.h"
 #include "lldb/Utility/RangeMap.h"
 #include "lldb/Utility/StreamString.h"
 #include "lldb/Utility/UUID.h"
index 1c166c0..cded6b5 100644 (file)
@@ -10,7 +10,6 @@
 #include "PECallFrameInfo.h"
 #include "WindowsMiniDump.h"
 
-#include "lldb/Core/FileSpecList.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleSpec.h"
 #include "lldb/Core/PluginManager.h"
@@ -25,6 +24,7 @@
 #include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/FileSpec.h"
+#include "lldb/Utility/FileSpecList.h"
 #include "lldb/Utility/LLDBLog.h"
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/StreamString.h"
index 4fd7521..a51e0b9 100644 (file)
 #define LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMDARWIN_H
 
 #include "Plugins/Platform/POSIX/PlatformPOSIX.h"
-#include "lldb/Core/FileSpecList.h"
 #include "lldb/Host/FileSystem.h"
 #include "lldb/Host/ProcessLaunchInfo.h"
 #include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/ConstString.h"
 #include "lldb/Utility/FileSpec.h"
+#include "lldb/Utility/FileSpecList.h"
 #include "lldb/Utility/Status.h"
 #include "lldb/Utility/StructuredData.h"
 #include "lldb/Utility/XcodeSDK.h"
@@ -51,7 +51,7 @@ public:
   static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch);
 
   static void DebuggerInitialize(lldb_private::Debugger &debugger);
-  
+
   static void Initialize();
 
   static void Terminate();
@@ -108,7 +108,7 @@ public:
   FileSpec LocateExecutable(const char *basename) override;
 
   Status LaunchProcess(ProcessLaunchInfo &launch_info) override;
-  
+
   Args GetExtraStartupCommands() override;
 
   static std::tuple<llvm::VersionTuple, llvm::StringRef>
index 3942f4f..4a01a64 100644 (file)
 #define LLDB_SOURCE_PLUGINS_SYMBOLFILE_BREAKPAD_SYMBOLFILEBREAKPAD_H
 
 #include "Plugins/ObjectFile/Breakpad/BreakpadRecords.h"
-#include "lldb/Core/FileSpecList.h"
 #include "lldb/Symbol/LineTable.h"
 #include "lldb/Symbol/PostfixExpression.h"
 #include "lldb/Symbol/SymbolFile.h"
 #include "lldb/Symbol/UnwindPlan.h"
+#include "lldb/Utility/FileSpecList.h"
 #include <optional>
 
 namespace lldb_private {
index c48ccdd..d8c18b1 100644 (file)
@@ -39,6 +39,7 @@ add_lldb_library(lldbUtility NO_INTERNAL_DEPENDENCIES
   Environment.cpp
   Event.cpp
   FileSpec.cpp
+  FileSpecList.cpp
   GDBRemote.cpp
   IOObject.cpp
   LLDBAssert.cpp
similarity index 99%
rename from lldb/source/Core/FileSpecList.cpp
rename to lldb/source/Utility/FileSpecList.cpp
index 7fa5111..e5e0ac3 100644 (file)
@@ -6,14 +6,12 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "lldb/Core/FileSpecList.h"
-
+#include "lldb/Utility/FileSpecList.h"
 #include "lldb/Utility/ConstString.h"
 #include "lldb/Utility/Stream.h"
 
-#include <utility>
-
 #include <cstdint>
+#include <utility>
 
 using namespace lldb_private;
 
index d1a8ead..d65e7cd 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "gtest/gtest.h"
 
-#include "lldb/Core/FileSpecList.h"
+#include "lldb/Utility/FileSpecList.h"
 
 using namespace lldb_private;