sammccall created this revision. sammccall added reviewers: JDevlieghere, labath, chandlerc. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. labath added a comment.
I am not sure about the consistency argument (on the other CL), as it seems to me that most/all llvm .inc files *which are produced by tblgen" are included by via just their bare names. However, these files generally have unique names, which is usually achieved by just embedding (a derivative of) the folder name into the .inc file name (e.g. AArch64GenAsmWriter.inc, AMDGPUGenAsmWriter.inc, ...). So, I think the most consistent approach here would be to rename lldb files into something like `TargetProperties.inc`, `CoreProperties.inc` etc. Consistency considerations aside, I do think that having a bunch of files called `Properties.inc` is a bit confusing, and it would be good to disambiguate between them. I'm fairly ambivalent about whether that is achieved by prefixing the include directives with the folder name, or by renaming the files so that they have unique names. This is a bit more explicit, and makes it possible to build LLDB without varying the -I lines per-directory. (The latter is useful because many build systems only allow this to be configured per-library, and LLDB is insufficiently layered to be split into multiple libraries on stricter build systems). (My comment on D65185 <https://reviews.llvm.org/D65185> has some more context) Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D65397 Files: lldb/source/Core/Debugger.cpp lldb/source/Core/ModuleList.cpp lldb/source/Interpreter/CommandInterpreter.cpp lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp lldb/source/Target/Platform.cpp lldb/source/Target/Process.cpp lldb/source/Target/Target.cpp lldb/source/Target/Thread.cpp
Index: lldb/source/Target/Thread.cpp =================================================================== --- lldb/source/Target/Thread.cpp +++ lldb/source/Target/Thread.cpp @@ -65,12 +65,12 @@ static constexpr PropertyDefinition g_properties[] = { #define LLDB_PROPERTIES_thread -#include "Properties.inc" +#include "Target/Properties.inc" }; enum { #define LLDB_PROPERTIES_thread -#include "PropertiesEnum.inc" +#include "Target/PropertiesEnum.inc" }; class ThreadOptionValueProperties : public OptionValueProperties { Index: lldb/source/Target/Target.cpp =================================================================== --- lldb/source/Target/Target.cpp +++ lldb/source/Target/Target.cpp @@ -3275,12 +3275,12 @@ static constexpr PropertyDefinition g_properties[] = { #define LLDB_PROPERTIES_target -#include "Properties.inc" +#include "Target/Properties.inc" }; enum { #define LLDB_PROPERTIES_target -#include "PropertiesEnum.inc" +#include "Target/PropertiesEnum.inc" ePropertyExperimental, }; @@ -3358,12 +3358,12 @@ // TargetProperties static constexpr PropertyDefinition g_experimental_properties[]{ #define LLDB_PROPERTIES_experimental -#include "Properties.inc" +#include "Target/Properties.inc" }; enum { #define LLDB_PROPERTIES_experimental -#include "PropertiesEnum.inc" +#include "Target/PropertiesEnum.inc" }; class TargetExperimentalOptionValueProperties : public OptionValueProperties { Index: lldb/source/Target/Process.cpp =================================================================== --- lldb/source/Target/Process.cpp +++ lldb/source/Target/Process.cpp @@ -114,12 +114,12 @@ static constexpr PropertyDefinition g_properties[] = { #define LLDB_PROPERTIES_process -#include "Properties.inc" +#include "Target/Properties.inc" }; enum { #define LLDB_PROPERTIES_process -#include "PropertiesEnum.inc" +#include "Target/PropertiesEnum.inc" }; ProcessProperties::ProcessProperties(lldb_private::Process *process) Index: lldb/source/Target/Platform.cpp =================================================================== --- lldb/source/Target/Platform.cpp +++ lldb/source/Target/Platform.cpp @@ -65,12 +65,12 @@ static constexpr PropertyDefinition g_properties[] = { #define LLDB_PROPERTIES_platform -#include "Properties.inc" +#include "Target/Properties.inc" }; enum { #define LLDB_PROPERTIES_platform -#include "PropertiesEnum.inc" +#include "Target/PropertiesEnum.inc" }; } // namespace Index: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -115,12 +115,12 @@ static constexpr PropertyDefinition g_properties[] = { #define LLDB_PROPERTIES_symbolfiledwarf -#include "Properties.inc" +#include "Plugins/SymbolFile/DWARF/Properties.inc" }; enum { #define LLDB_PROPERTIES_symbolfiledwarf -#include "PropertiesEnum.inc" +#include "Plugins/SymbolFile/DWARF/PropertiesEnum.inc" }; class PluginProperties : public Properties { Index: lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp =================================================================== --- lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp +++ lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp @@ -106,12 +106,12 @@ static constexpr PropertyDefinition g_properties[] = { #define LLDB_PROPERTIES_darwinlog -#include "Properties.inc" +#include "Plugins/StructuredData/DarwinLog/Properties.inc" }; enum { #define LLDB_PROPERTIES_darwinlog -#include "PropertiesEnum.inc" +#include "Plugins/StructuredData/DarwinLog/PropertiesEnum.inc" }; class StructuredDataDarwinLogProperties : public Properties { Index: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp =================================================================== --- lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -112,12 +112,12 @@ static constexpr PropertyDefinition g_properties[] = { #define LLDB_PROPERTIES_processgdbremote -#include "Properties.inc" +#include "Plugins/Process/gdb-remote/Properties.inc" }; enum { #define LLDB_PROPERTIES_processgdbremote -#include "PropertiesEnum.inc" +#include "Plugins/Process/gdb-remote/PropertiesEnum.inc" }; class PluginProperties : public Properties { Index: lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp =================================================================== --- lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp +++ lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp @@ -54,12 +54,12 @@ static constexpr PropertyDefinition g_properties[] = { #define LLDB_PROPERTIES_processkdp -#include "Properties.inc" +#include "Plugins/Process/MacOSX-Kernel/Properties.inc" }; enum { #define LLDB_PROPERTIES_processkdp -#include "PropertiesEnum.inc" +#include "Plugins/Process/MacOSX-Kernel/PropertiesEnum.inc" }; class PluginProperties : public Properties { Index: lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp =================================================================== --- lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp +++ lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp @@ -179,12 +179,12 @@ static constexpr PropertyDefinition g_properties[] = { #define LLDB_PROPERTIES_platformdarwinkernel -#include "Properties.inc" +#include "Plugins/Platform/MacOSX/Properties.inc" }; enum { #define LLDB_PROPERTIES_platformdarwinkernel -#include "PropertiesEnum.inc" +#include "Plugins/Platform/MacOSX/PropertiesEnum.inc" }; class PlatformDarwinKernelProperties : public Properties { Index: lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp =================================================================== --- lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp +++ lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp @@ -68,12 +68,12 @@ static constexpr PropertyDefinition g_properties[] = { #define LLDB_PROPERTIES_jitloadergdb -#include "Properties.inc" +#include "Plugins/JITLoader/GDB/Properties.inc" }; enum { #define LLDB_PROPERTIES_jitloadergdb -#include "PropertiesEnum.inc" +#include "Plugins/JITLoader/GDB/PropertiesEnum.inc" ePropertyEnableJITBreakpoint }; Index: lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp =================================================================== --- lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp +++ lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp @@ -74,12 +74,12 @@ static constexpr PropertyDefinition g_properties[] = { #define LLDB_PROPERTIES_dynamicloaderdarwinkernel -#include "Properties.inc" +#include "Plugins/DynamicLoader/Darwin-Kernel/Properties.inc" }; enum { #define LLDB_PROPERTIES_dynamicloaderdarwinkernel -#include "PropertiesEnum.inc" +#include "Plugins/DynamicLoader/Darwin-Kernel/PropertiesEnum.inc" }; class DynamicLoaderDarwinKernelProperties : public Properties { Index: lldb/source/Interpreter/CommandInterpreter.cpp =================================================================== --- lldb/source/Interpreter/CommandInterpreter.cpp +++ lldb/source/Interpreter/CommandInterpreter.cpp @@ -91,12 +91,12 @@ static constexpr PropertyDefinition g_properties[] = { #define LLDB_PROPERTIES_commandinterpreter -#include "Properties.inc" +#include "Interpreter/Properties.inc" }; enum { #define LLDB_PROPERTIES_commandinterpreter -#include "PropertiesEnum.inc" +#include "Interpreter/PropertiesEnum.inc" }; ConstString &CommandInterpreter::GetStaticBroadcasterClass() { Index: lldb/source/Core/ModuleList.cpp =================================================================== --- lldb/source/Core/ModuleList.cpp +++ lldb/source/Core/ModuleList.cpp @@ -67,12 +67,12 @@ static constexpr PropertyDefinition g_properties[] = { #define LLDB_PROPERTIES_modulelist -#include "Properties.inc" +#include "Core/Properties.inc" }; enum { #define LLDB_PROPERTIES_modulelist -#include "PropertiesEnum.inc" +#include "Core/PropertiesEnum.inc" }; } // namespace Index: lldb/source/Core/Debugger.cpp =================================================================== --- lldb/source/Core/Debugger.cpp +++ lldb/source/Core/Debugger.cpp @@ -204,12 +204,12 @@ static constexpr PropertyDefinition g_properties[] = { #define LLDB_PROPERTIES_debugger -#include "Properties.inc" +#include "Core/Properties.inc" }; enum { #define LLDB_PROPERTIES_debugger -#include "PropertiesEnum.inc" +#include "Core/PropertiesEnum.inc" }; LoadPluginCallbackType Debugger::g_load_plugin_callback = nullptr;
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits