Skip to content

[lldb] Move ValueObject into its own library (NFC) #113393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 25, 2024

Conversation

JDevlieghere
Copy link
Member

@JDevlieghere JDevlieghere commented Oct 22, 2024

ValueObject is part of lldbCore for historical reasons, but conceptually it deserves to be its own library. This does introduce a circular dependency between lldbCore and lldbValueObject, which is unfortunate but probably unavoidable because so many things in LLDB rely on ValueObject. We already have cycles and these libraries are never built as dylibs so while this doesn't improve the situation, it also doesn't make things worse.

The header includes were updated with the following command:

find . -type f -exec sed -i.bak "s%include \"lldb/Core/ValueObject%include \"lldb/ValueObject/ValueObject%" '{}' \;

@llvmbot
Copy link
Member

llvmbot commented Oct 22, 2024

@llvm/pr-subscribers-lldb

@llvm/pr-subscribers-backend-hexagon

Author: Jonas Devlieghere (JDevlieghere)

Changes

ValueObject is part of lldbCore for historical reasons, but it can totally stand on its own. This does introduce a circular dependency between lldbCore and lldbValueObject, which is unfortunate but probably unavoidable.

The header includes were updated with the following command:

find . -type f -exec sed -i.bak "s%include \"lldb/Core/ValueObject%include \"lldb/ValueObject/ValueObject%" '{}' \;

Patch is 135.93 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/113393.diff

188 Files Affected:

  • (modified) lldb/include/lldb/Core/IOHandler.h (-1)
  • (modified) lldb/include/lldb/DataFormatters/FormattersContainer.h (+1-1)
  • (modified) lldb/include/lldb/DataFormatters/TypeFormat.h (+1-1)
  • (modified) lldb/include/lldb/DataFormatters/TypeSynthetic.h (+1-1)
  • (modified) lldb/include/lldb/Expression/ExpressionVariable.h (+1-1)
  • (modified) lldb/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h (+1-1)
  • (modified) lldb/include/lldb/Target/LanguageRuntime.h (+1-1)
  • (modified) lldb/include/lldb/Target/StackFrame.h (+1-1)
  • (modified) lldb/include/lldb/Target/StackFrameRecognizer.h (+2-2)
  • (renamed) lldb/include/lldb/ValueObject/ValueObject.h ()
  • (renamed) lldb/include/lldb/ValueObject/ValueObjectCast.h (+1-1)
  • (renamed) lldb/include/lldb/ValueObject/ValueObjectChild.h (+1-1)
  • (renamed) lldb/include/lldb/ValueObject/ValueObjectConstResult.h (+2-2)
  • (renamed) lldb/include/lldb/ValueObject/ValueObjectConstResultCast.h (+2-2)
  • (renamed) lldb/include/lldb/ValueObject/ValueObjectConstResultChild.h (+2-2)
  • (renamed) lldb/include/lldb/ValueObject/ValueObjectConstResultImpl.h ()
  • (renamed) lldb/include/lldb/ValueObject/ValueObjectDynamicValue.h (+1-1)
  • (renamed) lldb/include/lldb/ValueObject/ValueObjectList.h ()
  • (renamed) lldb/include/lldb/ValueObject/ValueObjectMemory.h (+1-1)
  • (renamed) lldb/include/lldb/ValueObject/ValueObjectRegister.h (+1-1)
  • (renamed) lldb/include/lldb/ValueObject/ValueObjectSyntheticFilter.h (+1-1)
  • (renamed) lldb/include/lldb/ValueObject/ValueObjectUpdater.h (+1-1)
  • (renamed) lldb/include/lldb/ValueObject/ValueObjectVTable.h (+1-1)
  • (renamed) lldb/include/lldb/ValueObject/ValueObjectVariable.h (+1-1)
  • (modified) lldb/source/API/CMakeLists.txt (+1)
  • (modified) lldb/source/API/SBBlock.cpp (+1-1)
  • (modified) lldb/source/API/SBFrame.cpp (+3-3)
  • (modified) lldb/source/API/SBModule.cpp (+2-2)
  • (modified) lldb/source/API/SBTarget.cpp (+3-3)
  • (modified) lldb/source/API/SBThread.cpp (+1-1)
  • (modified) lldb/source/API/SBType.cpp (+1-1)
  • (modified) lldb/source/API/SBValue.cpp (+2-2)
  • (modified) lldb/source/API/SBValueList.cpp (+1-1)
  • (modified) lldb/source/Breakpoint/BreakpointLocation.cpp (+1-1)
  • (modified) lldb/source/Breakpoint/Watchpoint.cpp (+2-2)
  • (modified) lldb/source/CMakeLists.txt (+1)
  • (modified) lldb/source/Commands/CommandObjectDWIMPrint.cpp (+1-1)
  • (modified) lldb/source/Commands/CommandObjectFrame.cpp (+1-1)
  • (modified) lldb/source/Commands/CommandObjectMemory.cpp (+1-1)
  • (modified) lldb/source/Commands/CommandObjectTarget.cpp (+1-1)
  • (modified) lldb/source/Commands/CommandObjectThread.cpp (+1-1)
  • (modified) lldb/source/Commands/CommandObjectWatchpoint.cpp (+1-1)
  • (modified) lldb/source/Core/CMakeLists.txt (+1-15)
  • (modified) lldb/source/Core/DumpRegisterValue.cpp (+2-2)
  • (modified) lldb/source/Core/FormatEntity.cpp (+2-2)
  • (modified) lldb/source/Core/IOHandlerCursesGUI.cpp (+3-3)
  • (modified) lldb/source/DataFormatters/CMakeLists.txt (+2-1)
  • (modified) lldb/source/DataFormatters/CXXFunctionPointer.cpp (+1-1)
  • (modified) lldb/source/DataFormatters/DumpValueObjectOptions.cpp (+1-1)
  • (modified) lldb/source/DataFormatters/FormatManager.cpp (+1-1)
  • (modified) lldb/source/DataFormatters/StringPrinter.cpp (+1-1)
  • (modified) lldb/source/DataFormatters/TypeSummary.cpp (+1-1)
  • (modified) lldb/source/DataFormatters/ValueObjectPrinter.cpp (+1-1)
  • (modified) lldb/source/DataFormatters/VectorType.cpp (+2-2)
  • (modified) lldb/source/Expression/CMakeLists.txt (+1)
  • (modified) lldb/source/Expression/FunctionCaller.cpp (+2-2)
  • (modified) lldb/source/Expression/IRInterpreter.cpp (+1-1)
  • (modified) lldb/source/Expression/LLVMUserExpression.cpp (+1-1)
  • (modified) lldb/source/Expression/Materializer.cpp (+2-2)
  • (modified) lldb/source/Expression/UserExpression.cpp (+1-1)
  • (modified) lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp (+1-1)
  • (modified) lldb/source/Plugins/ABI/AArch64/ABISysV_arm64.cpp (+1-1)
  • (modified) lldb/source/Plugins/ABI/AArch64/CMakeLists.txt (+1)
  • (modified) lldb/source/Plugins/ABI/ARC/ABISysV_arc.cpp (+3-3)
  • (modified) lldb/source/Plugins/ABI/ARC/CMakeLists.txt (+1)
  • (modified) lldb/source/Plugins/ABI/ARM/ABIMacOSX_arm.cpp (+1-1)
  • (modified) lldb/source/Plugins/ABI/ARM/ABISysV_arm.cpp (+1-1)
  • (modified) lldb/source/Plugins/ABI/ARM/CMakeLists.txt (+1)
  • (modified) lldb/source/Plugins/ABI/Hexagon/ABISysV_hexagon.cpp (+3-3)
  • (modified) lldb/source/Plugins/ABI/Hexagon/CMakeLists.txt (+1)
  • (modified) lldb/source/Plugins/ABI/MSP430/ABISysV_msp430.cpp (+3-3)
  • (modified) lldb/source/Plugins/ABI/Mips/ABISysV_mips.cpp (+3-3)
  • (modified) lldb/source/Plugins/ABI/Mips/ABISysV_mips64.cpp (+3-3)
  • (modified) lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc.cpp (+3-3)
  • (modified) lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc64.cpp (+3-3)
  • (modified) lldb/source/Plugins/ABI/PowerPC/CMakeLists.txt (+1)
  • (modified) lldb/source/Plugins/ABI/RISCV/ABISysV_riscv.cpp (+1-1)
  • (modified) lldb/source/Plugins/ABI/RISCV/CMakeLists.txt (+1)
  • (modified) lldb/source/Plugins/ABI/SystemZ/ABISysV_s390x.cpp (+3-3)
  • (modified) lldb/source/Plugins/ABI/SystemZ/CMakeLists.txt (+1)
  • (modified) lldb/source/Plugins/ABI/X86/ABIMacOSX_i386.cpp (+1-1)
  • (modified) lldb/source/Plugins/ABI/X86/ABISysV_i386.cpp (+3-3)
  • (modified) lldb/source/Plugins/ABI/X86/ABISysV_x86_64.cpp (+3-3)
  • (modified) lldb/source/Plugins/ABI/X86/ABIWindows_x86_64.cpp (+3-3)
  • (modified) lldb/source/Plugins/ABI/X86/CMakeLists.txt (+1)
  • (modified) lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp (+2-2)
  • (modified) lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionUtil.cpp (+1-1)
  • (modified) lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp (+1-1)
  • (modified) lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp (+2-2)
  • (modified) lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h (+1-1)
  • (modified) lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp (+1-1)
  • (modified) lldb/source/Plugins/InstrumentationRuntime/TSan/CMakeLists.txt (+1)
  • (modified) lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp (+1-1)
  • (modified) lldb/source/Plugins/InstrumentationRuntime/UBSan/CMakeLists.txt (+1)
  • (modified) lldb/source/Plugins/InstrumentationRuntime/UBSan/InstrumentationRuntimeUBSan.cpp (+1-1)
  • (modified) lldb/source/Plugins/InstrumentationRuntime/Utility/CMakeLists.txt (+1)
  • (modified) lldb/source/Plugins/InstrumentationRuntime/Utility/ReportRetriever.cpp (+1-1)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/BlockPointer.cpp (+2-2)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/CMakeLists.txt (+1)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp (+1-1)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/Coroutines.h (+1-1)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/CxxStringTypes.cpp (+2-2)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/CxxStringTypes.h (+1-1)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/Generic.h (+1-1)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp (+2-2)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/LibCxx.h (+1-1)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/LibCxxAtomic.h (+1-1)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp (+1-1)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/LibCxxList.cpp (+2-2)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp (+2-2)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/LibCxxProxyArray.cpp (+1-1)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/LibCxxRangesRefView.cpp (+1-1)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/LibCxxSliceArray.cpp (+1-1)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/LibCxxSpan.cpp (+1-1)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp (+2-2)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/LibCxxValarray.cpp (+1-1)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.h (+1-1)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp (+1-1)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp (+2-2)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.h (+1-1)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/LibStdcppTuple.cpp (+1-1)
  • (modified) lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp (+1-1)
  • (modified) lldb/source/Plugins/Language/ObjC/CF.cpp (+2-2)
  • (modified) lldb/source/Plugins/Language/ObjC/CF.h (+1-1)
  • (modified) lldb/source/Plugins/Language/ObjC/CMakeLists.txt (+1)
  • (modified) lldb/source/Plugins/Language/ObjC/Cocoa.cpp (+2-2)
  • (modified) lldb/source/Plugins/Language/ObjC/Cocoa.h (+1-1)
  • (modified) lldb/source/Plugins/Language/ObjC/CoreMedia.h (+1-1)
  • (modified) lldb/source/Plugins/Language/ObjC/NSArray.cpp (+2-2)
  • (modified) lldb/source/Plugins/Language/ObjC/NSDictionary.cpp (+2-2)
  • (modified) lldb/source/Plugins/Language/ObjC/NSDictionary.h (+1-1)
  • (modified) lldb/source/Plugins/Language/ObjC/NSError.cpp (+2-2)
  • (modified) lldb/source/Plugins/Language/ObjC/NSException.cpp (+2-2)
  • (modified) lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp (+2-2)
  • (modified) lldb/source/Plugins/Language/ObjC/NSSet.cpp (+2-2)
  • (modified) lldb/source/Plugins/Language/ObjC/NSSet.h (+1-1)
  • (modified) lldb/source/Plugins/Language/ObjC/NSString.cpp (+2-2)
  • (modified) lldb/source/Plugins/Language/ObjC/NSString.h (+1-1)
  • (modified) lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp (+1-1)
  • (modified) lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/CMakeLists.txt (+1)
  • (modified) lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp (+2-2)
  • (modified) lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp (+2-2)
  • (modified) lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp (+2-2)
  • (modified) lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/CMakeLists.txt (+1)
  • (modified) lldb/source/Plugins/LanguageRuntime/ObjC/GNUstepObjCRuntime/CMakeLists.txt (+1)
  • (modified) lldb/source/Plugins/LanguageRuntime/ObjC/GNUstepObjCRuntime/GNUstepObjCRuntime.cpp (+1-1)
  • (modified) lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp (+1-1)
  • (modified) lldb/source/Plugins/MemoryHistory/asan/CMakeLists.txt (+1)
  • (modified) lldb/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp (+1-1)
  • (modified) lldb/source/Plugins/OperatingSystem/Python/CMakeLists.txt (+1)
  • (modified) lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp (+1-1)
  • (modified) lldb/source/Plugins/Platform/Android/CMakeLists.txt (+1)
  • (modified) lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp (+1-1)
  • (modified) lldb/source/Plugins/Platform/POSIX/CMakeLists.txt (+1)
  • (modified) lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp (+1-1)
  • (modified) lldb/source/Plugins/Process/Utility/CMakeLists.txt (+1)
  • (modified) lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp (+1-1)
  • (modified) lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp (+1-1)
  • (modified) lldb/source/Plugins/SymbolFile/DWARF/CMakeLists.txt (+1)
  • (modified) lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.cpp (+1-1)
  • (modified) lldb/source/Plugins/SystemRuntime/MacOSX/AbortWithPayloadFrameRecognizer.cpp (+1-1)
  • (modified) lldb/source/Plugins/SystemRuntime/MacOSX/CMakeLists.txt (+1)
  • (modified) lldb/source/Symbol/CMakeLists.txt (+1)
  • (modified) lldb/source/Symbol/Variable.cpp (+2-2)
  • (modified) lldb/source/Target/ABI.cpp (+1-1)
  • (modified) lldb/source/Target/CMakeLists.txt (+1)
  • (modified) lldb/source/Target/StackFrame.cpp (+3-3)
  • (modified) lldb/source/Target/StopInfo.cpp (+1-1)
  • (modified) lldb/source/Target/Target.cpp (+2-2)
  • (modified) lldb/source/Target/Thread.cpp (+2-2)
  • (modified) lldb/source/Target/ThreadPlanStepOut.cpp (+1-1)
  • (added) lldb/source/ValueObject/CMakeLists.txt (+35)
  • (renamed) lldb/source/ValueObject/ValueObject.cpp (+14-15)
  • (renamed) lldb/source/ValueObject/ValueObjectCast.cpp (+2-2)
  • (renamed) lldb/source/ValueObject/ValueObjectChild.cpp (+1-1)
  • (renamed) lldb/source/ValueObject/ValueObjectConstResult.cpp (+2-2)
  • (renamed) lldb/source/ValueObject/ValueObjectConstResultCast.cpp (+1-1)
  • (renamed) lldb/source/ValueObject/ValueObjectConstResultChild.cpp (+1-1)
  • (renamed) lldb/source/ValueObject/ValueObjectConstResultImpl.cpp (+5-5)
  • (renamed) lldb/source/ValueObject/ValueObjectDynamicValue.cpp (+2-2)
  • (renamed) lldb/source/ValueObject/ValueObjectList.cpp (+2-2)
  • (renamed) lldb/source/ValueObject/ValueObjectMemory.cpp (+2-2)
  • (renamed) lldb/source/ValueObject/ValueObjectRegister.cpp (+1-1)
  • (renamed) lldb/source/ValueObject/ValueObjectSyntheticFilter.cpp (+2-2)
  • (renamed) lldb/source/ValueObject/ValueObjectUpdater.cpp (+1-1)
  • (renamed) lldb/source/ValueObject/ValueObjectVTable.cpp (+2-2)
  • (renamed) lldb/source/ValueObject/ValueObjectVariable.cpp (+1-1)
  • (modified) lldb/unittests/ValueObject/DumpValueObjectOptionsTests.cpp (+2-2)
diff --git a/lldb/include/lldb/Core/IOHandler.h b/lldb/include/lldb/Core/IOHandler.h
index f10d63198aefad..cb14d724132091 100644
--- a/lldb/include/lldb/Core/IOHandler.h
+++ b/lldb/include/lldb/Core/IOHandler.h
@@ -9,7 +9,6 @@
 #ifndef LLDB_CORE_IOHANDLER_H
 #define LLDB_CORE_IOHANDLER_H
 
-#include "lldb/Core/ValueObjectList.h"
 #include "lldb/Host/Config.h"
 #include "lldb/Utility/CompletionRequest.h"
 #include "lldb/Utility/Flags.h"
diff --git a/lldb/include/lldb/DataFormatters/FormattersContainer.h b/lldb/include/lldb/DataFormatters/FormattersContainer.h
index fd046e773b6902..7898621fd18af5 100644
--- a/lldb/include/lldb/DataFormatters/FormattersContainer.h
+++ b/lldb/include/lldb/DataFormatters/FormattersContainer.h
@@ -17,7 +17,6 @@
 
 #include "lldb/lldb-public.h"
 
-#include "lldb/Core/ValueObject.h"
 #include "lldb/DataFormatters/FormatClasses.h"
 #include "lldb/DataFormatters/TypeFormat.h"
 #include "lldb/DataFormatters/TypeSummary.h"
@@ -25,6 +24,7 @@
 #include "lldb/Symbol/CompilerType.h"
 #include "lldb/Utility/RegularExpression.h"
 #include "lldb/Utility/StringLexer.h"
+#include "lldb/ValueObject/ValueObject.h"
 
 namespace lldb_private {
 
diff --git a/lldb/include/lldb/DataFormatters/TypeFormat.h b/lldb/include/lldb/DataFormatters/TypeFormat.h
index 4e19d4cb14a176..63d4765bdf270e 100644
--- a/lldb/include/lldb/DataFormatters/TypeFormat.h
+++ b/lldb/include/lldb/DataFormatters/TypeFormat.h
@@ -18,7 +18,7 @@
 #include "lldb/lldb-enumerations.h"
 #include "lldb/lldb-public.h"
 
-#include "lldb/Core/ValueObject.h"
+#include "lldb/ValueObject/ValueObject.h"
 
 namespace lldb_private {
 class TypeFormatImpl {
diff --git a/lldb/include/lldb/DataFormatters/TypeSynthetic.h b/lldb/include/lldb/DataFormatters/TypeSynthetic.h
index ede7442a02bf6a..bf6dc6a0c3c6bf 100644
--- a/lldb/include/lldb/DataFormatters/TypeSynthetic.h
+++ b/lldb/include/lldb/DataFormatters/TypeSynthetic.h
@@ -20,8 +20,8 @@
 #include "lldb/lldb-enumerations.h"
 #include "lldb/lldb-public.h"
 
-#include "lldb/Core/ValueObject.h"
 #include "lldb/Utility/StructuredData.h"
+#include "lldb/ValueObject/ValueObject.h"
 
 namespace lldb_private {
 class SyntheticChildrenFrontEnd {
diff --git a/lldb/include/lldb/Expression/ExpressionVariable.h b/lldb/include/lldb/Expression/ExpressionVariable.h
index 277b00a9166868..fc36793b3a475c 100644
--- a/lldb/include/lldb/Expression/ExpressionVariable.h
+++ b/lldb/include/lldb/Expression/ExpressionVariable.h
@@ -15,8 +15,8 @@
 
 #include "llvm/ADT/DenseMap.h"
 
-#include "lldb/Core/ValueObject.h"
 #include "lldb/Utility/ConstString.h"
+#include "lldb/ValueObject/ValueObject.h"
 #include "lldb/lldb-public.h"
 #include "llvm/Support/ExtensibleRTTI.h"
 
diff --git a/lldb/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h b/lldb/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h
index 9b545c46fba4d1..ebf26cea95cf3b 100644
--- a/lldb/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h
+++ b/lldb/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h
@@ -9,8 +9,8 @@
 #ifndef LLDB_INTERPRETER_OPTIONGROUPVALUEOBJECTDISPLAY_H
 #define LLDB_INTERPRETER_OPTIONGROUPVALUEOBJECTDISPLAY_H
 
-#include "lldb/Core/ValueObject.h"
 #include "lldb/Interpreter/Options.h"
+#include "lldb/ValueObject/ValueObject.h"
 
 namespace lldb_private {
 
diff --git a/lldb/include/lldb/Target/LanguageRuntime.h b/lldb/include/lldb/Target/LanguageRuntime.h
index 954d454c785898..21bdc61b8cbcf0 100644
--- a/lldb/include/lldb/Target/LanguageRuntime.h
+++ b/lldb/include/lldb/Target/LanguageRuntime.h
@@ -14,11 +14,11 @@
 #include "lldb/Breakpoint/BreakpointResolverName.h"
 #include "lldb/Core/PluginInterface.h"
 #include "lldb/Core/Value.h"
-#include "lldb/Core/ValueObject.h"
 #include "lldb/Expression/LLVMUserExpression.h"
 #include "lldb/Symbol/DeclVendor.h"
 #include "lldb/Target/ExecutionContextScope.h"
 #include "lldb/Target/Runtime.h"
+#include "lldb/ValueObject/ValueObject.h"
 #include "lldb/lldb-private.h"
 #include "lldb/lldb-public.h"
 #include <optional>
diff --git a/lldb/include/lldb/Target/StackFrame.h b/lldb/include/lldb/Target/StackFrame.h
index fdbe1f567eabfa..3881137583b941 100644
--- a/lldb/include/lldb/Target/StackFrame.h
+++ b/lldb/include/lldb/Target/StackFrame.h
@@ -16,7 +16,6 @@
 #include "lldb/Utility/Flags.h"
 
 #include "lldb/Core/FormatEntity.h"
-#include "lldb/Core/ValueObjectList.h"
 #include "lldb/Symbol/SymbolContext.h"
 #include "lldb/Target/ExecutionContextScope.h"
 #include "lldb/Target/StackID.h"
@@ -24,6 +23,7 @@
 #include "lldb/Utility/Status.h"
 #include "lldb/Utility/StreamString.h"
 #include "lldb/Utility/UserID.h"
+#include "lldb/ValueObject/ValueObjectList.h"
 
 namespace lldb_private {
 
diff --git a/lldb/include/lldb/Target/StackFrameRecognizer.h b/lldb/include/lldb/Target/StackFrameRecognizer.h
index 6c67a7fb4f68dd..8cf69a82eb8c0a 100644
--- a/lldb/include/lldb/Target/StackFrameRecognizer.h
+++ b/lldb/include/lldb/Target/StackFrameRecognizer.h
@@ -9,11 +9,11 @@
 #ifndef LLDB_TARGET_STACKFRAMERECOGNIZER_H
 #define LLDB_TARGET_STACKFRAMERECOGNIZER_H
 
-#include "lldb/Core/ValueObject.h"
-#include "lldb/Core/ValueObjectList.h"
 #include "lldb/Symbol/VariableList.h"
 #include "lldb/Target/StopInfo.h"
 #include "lldb/Utility/StructuredData.h"
+#include "lldb/ValueObject/ValueObject.h"
+#include "lldb/ValueObject/ValueObjectList.h"
 #include "lldb/lldb-private-forward.h"
 #include "lldb/lldb-public.h"
 
diff --git a/lldb/include/lldb/Core/ValueObject.h b/lldb/include/lldb/ValueObject/ValueObject.h
similarity index 100%
rename from lldb/include/lldb/Core/ValueObject.h
rename to lldb/include/lldb/ValueObject/ValueObject.h
diff --git a/lldb/include/lldb/Core/ValueObjectCast.h b/lldb/include/lldb/ValueObject/ValueObjectCast.h
similarity index 97%
rename from lldb/include/lldb/Core/ValueObjectCast.h
rename to lldb/include/lldb/ValueObject/ValueObjectCast.h
index ba25e166f32688..740dd61f53cd2a 100644
--- a/lldb/include/lldb/Core/ValueObjectCast.h
+++ b/lldb/include/lldb/ValueObject/ValueObjectCast.h
@@ -9,8 +9,8 @@
 #ifndef LLDB_CORE_VALUEOBJECTCAST_H
 #define LLDB_CORE_VALUEOBJECTCAST_H
 
-#include "lldb/Core/ValueObject.h"
 #include "lldb/Symbol/CompilerType.h"
+#include "lldb/ValueObject/ValueObject.h"
 #include "lldb/lldb-defines.h"
 #include "lldb/lldb-enumerations.h"
 #include "lldb/lldb-forward.h"
diff --git a/lldb/include/lldb/Core/ValueObjectChild.h b/lldb/include/lldb/ValueObject/ValueObjectChild.h
similarity index 98%
rename from lldb/include/lldb/Core/ValueObjectChild.h
rename to lldb/include/lldb/ValueObject/ValueObjectChild.h
index 1f88e607cb5737..8930384167ffac 100644
--- a/lldb/include/lldb/Core/ValueObjectChild.h
+++ b/lldb/include/lldb/ValueObject/ValueObjectChild.h
@@ -9,7 +9,7 @@
 #ifndef LLDB_CORE_VALUEOBJECTCHILD_H
 #define LLDB_CORE_VALUEOBJECTCHILD_H
 
-#include "lldb/Core/ValueObject.h"
+#include "lldb/ValueObject/ValueObject.h"
 
 #include "lldb/Symbol/CompilerType.h"
 #include "lldb/Utility/ConstString.h"
diff --git a/lldb/include/lldb/Core/ValueObjectConstResult.h b/lldb/include/lldb/ValueObject/ValueObjectConstResult.h
similarity index 98%
rename from lldb/include/lldb/Core/ValueObjectConstResult.h
rename to lldb/include/lldb/ValueObject/ValueObjectConstResult.h
index 9c34617af71d0d..6945be31360853 100644
--- a/lldb/include/lldb/Core/ValueObjectConstResult.h
+++ b/lldb/include/lldb/ValueObject/ValueObjectConstResult.h
@@ -10,11 +10,11 @@
 #define LLDB_CORE_VALUEOBJECTCONSTRESULT_H
 
 #include "lldb/Core/Value.h"
-#include "lldb/Core/ValueObject.h"
-#include "lldb/Core/ValueObjectConstResultImpl.h"
 #include "lldb/Symbol/CompilerType.h"
 #include "lldb/Utility/ConstString.h"
 #include "lldb/Utility/Status.h"
+#include "lldb/ValueObject/ValueObject.h"
+#include "lldb/ValueObject/ValueObjectConstResultImpl.h"
 #include "lldb/lldb-defines.h"
 #include "lldb/lldb-enumerations.h"
 #include "lldb/lldb-forward.h"
diff --git a/lldb/include/lldb/Core/ValueObjectConstResultCast.h b/lldb/include/lldb/ValueObject/ValueObjectConstResultCast.h
similarity index 95%
rename from lldb/include/lldb/Core/ValueObjectConstResultCast.h
rename to lldb/include/lldb/ValueObject/ValueObjectConstResultCast.h
index 911a08363b3935..b067689fde8c25 100644
--- a/lldb/include/lldb/Core/ValueObjectConstResultCast.h
+++ b/lldb/include/lldb/ValueObject/ValueObjectConstResultCast.h
@@ -9,10 +9,10 @@
 #ifndef LLDB_CORE_VALUEOBJECTCONSTRESULTCAST_H
 #define LLDB_CORE_VALUEOBJECTCONSTRESULTCAST_H
 
-#include "lldb/Core/ValueObjectCast.h"
-#include "lldb/Core/ValueObjectConstResultImpl.h"
 #include "lldb/Symbol/CompilerType.h"
 #include "lldb/Utility/ConstString.h"
+#include "lldb/ValueObject/ValueObjectCast.h"
+#include "lldb/ValueObject/ValueObjectConstResultImpl.h"
 #include "lldb/lldb-defines.h"
 #include "lldb/lldb-forward.h"
 #include "lldb/lldb-types.h"
diff --git a/lldb/include/lldb/Core/ValueObjectConstResultChild.h b/lldb/include/lldb/ValueObject/ValueObjectConstResultChild.h
similarity index 96%
rename from lldb/include/lldb/Core/ValueObjectConstResultChild.h
rename to lldb/include/lldb/ValueObject/ValueObjectConstResultChild.h
index 71a3c53befe786..875cec582eacea 100644
--- a/lldb/include/lldb/Core/ValueObjectConstResultChild.h
+++ b/lldb/include/lldb/ValueObject/ValueObjectConstResultChild.h
@@ -9,10 +9,10 @@
 #ifndef LLDB_CORE_VALUEOBJECTCONSTRESULTCHILD_H
 #define LLDB_CORE_VALUEOBJECTCONSTRESULTCHILD_H
 
-#include "lldb/Core/ValueObjectChild.h"
-#include "lldb/Core/ValueObjectConstResultImpl.h"
 #include "lldb/Symbol/CompilerType.h"
 #include "lldb/Utility/ConstString.h"
+#include "lldb/ValueObject/ValueObjectChild.h"
+#include "lldb/ValueObject/ValueObjectConstResultImpl.h"
 #include "lldb/lldb-defines.h"
 #include "lldb/lldb-forward.h"
 #include "lldb/lldb-types.h"
diff --git a/lldb/include/lldb/Core/ValueObjectConstResultImpl.h b/lldb/include/lldb/ValueObject/ValueObjectConstResultImpl.h
similarity index 100%
rename from lldb/include/lldb/Core/ValueObjectConstResultImpl.h
rename to lldb/include/lldb/ValueObject/ValueObjectConstResultImpl.h
diff --git a/lldb/include/lldb/Core/ValueObjectDynamicValue.h b/lldb/include/lldb/ValueObject/ValueObjectDynamicValue.h
similarity index 98%
rename from lldb/include/lldb/Core/ValueObjectDynamicValue.h
rename to lldb/include/lldb/ValueObject/ValueObjectDynamicValue.h
index 82c20eee0cd42d..f2f73f3c961da8 100644
--- a/lldb/include/lldb/Core/ValueObjectDynamicValue.h
+++ b/lldb/include/lldb/ValueObject/ValueObjectDynamicValue.h
@@ -10,10 +10,10 @@
 #define LLDB_CORE_VALUEOBJECTDYNAMICVALUE_H
 
 #include "lldb/Core/Address.h"
-#include "lldb/Core/ValueObject.h"
 #include "lldb/Symbol/CompilerType.h"
 #include "lldb/Symbol/Type.h"
 #include "lldb/Utility/ConstString.h"
+#include "lldb/ValueObject/ValueObject.h"
 #include "lldb/lldb-defines.h"
 #include "lldb/lldb-enumerations.h"
 #include "lldb/lldb-forward.h"
diff --git a/lldb/include/lldb/Core/ValueObjectList.h b/lldb/include/lldb/ValueObject/ValueObjectList.h
similarity index 100%
rename from lldb/include/lldb/Core/ValueObjectList.h
rename to lldb/include/lldb/ValueObject/ValueObjectList.h
diff --git a/lldb/include/lldb/Core/ValueObjectMemory.h b/lldb/include/lldb/ValueObject/ValueObjectMemory.h
similarity index 98%
rename from lldb/include/lldb/Core/ValueObjectMemory.h
rename to lldb/include/lldb/ValueObject/ValueObjectMemory.h
index a8fb0353d601b2..d728d7abf3431b 100644
--- a/lldb/include/lldb/Core/ValueObjectMemory.h
+++ b/lldb/include/lldb/ValueObject/ValueObjectMemory.h
@@ -10,9 +10,9 @@
 #define LLDB_CORE_VALUEOBJECTMEMORY_H
 
 #include "lldb/Core/Address.h"
-#include "lldb/Core/ValueObject.h"
 #include "lldb/Symbol/CompilerType.h"
 #include "lldb/Utility/ConstString.h"
+#include "lldb/ValueObject/ValueObject.h"
 #include "lldb/lldb-defines.h"
 #include "lldb/lldb-enumerations.h"
 #include "lldb/lldb-forward.h"
diff --git a/lldb/include/lldb/Core/ValueObjectRegister.h b/lldb/include/lldb/ValueObject/ValueObjectRegister.h
similarity index 99%
rename from lldb/include/lldb/Core/ValueObjectRegister.h
rename to lldb/include/lldb/ValueObject/ValueObjectRegister.h
index d948c663a4f8bf..aa0399294ea0ae 100644
--- a/lldb/include/lldb/Core/ValueObjectRegister.h
+++ b/lldb/include/lldb/ValueObject/ValueObjectRegister.h
@@ -9,10 +9,10 @@
 #ifndef LLDB_CORE_VALUEOBJECTREGISTER_H
 #define LLDB_CORE_VALUEOBJECTREGISTER_H
 
-#include "lldb/Core/ValueObject.h"
 #include "lldb/Symbol/CompilerType.h"
 #include "lldb/Utility/ConstString.h"
 #include "lldb/Utility/RegisterValue.h"
+#include "lldb/ValueObject/ValueObject.h"
 #include "lldb/lldb-defines.h"
 #include "lldb/lldb-enumerations.h"
 #include "lldb/lldb-forward.h"
diff --git a/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h b/lldb/include/lldb/ValueObject/ValueObjectSyntheticFilter.h
similarity index 99%
rename from lldb/include/lldb/Core/ValueObjectSyntheticFilter.h
rename to lldb/include/lldb/ValueObject/ValueObjectSyntheticFilter.h
index ca6d6c728005db..9f658dbd135d4e 100644
--- a/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h
+++ b/lldb/include/lldb/ValueObject/ValueObjectSyntheticFilter.h
@@ -9,9 +9,9 @@
 #ifndef LLDB_CORE_VALUEOBJECTSYNTHETICFILTER_H
 #define LLDB_CORE_VALUEOBJECTSYNTHETICFILTER_H
 
-#include "lldb/Core/ValueObject.h"
 #include "lldb/Symbol/CompilerType.h"
 #include "lldb/Utility/ConstString.h"
+#include "lldb/ValueObject/ValueObject.h"
 #include "lldb/lldb-defines.h"
 #include "lldb/lldb-enumerations.h"
 #include "lldb/lldb-forward.h"
diff --git a/lldb/include/lldb/Core/ValueObjectUpdater.h b/lldb/include/lldb/ValueObject/ValueObjectUpdater.h
similarity index 97%
rename from lldb/include/lldb/Core/ValueObjectUpdater.h
rename to lldb/include/lldb/ValueObject/ValueObjectUpdater.h
index 54fcb31076adde..3b2aa6c08b006f 100644
--- a/lldb/include/lldb/Core/ValueObjectUpdater.h
+++ b/lldb/include/lldb/ValueObject/ValueObjectUpdater.h
@@ -9,7 +9,7 @@
 #ifndef LLDB_CORE_VALUEOBJECTUPDATER_H
 #define LLDB_CORE_VALUEOBJECTUPDATER_H
 
-#include "lldb/Core/ValueObject.h"
+#include "lldb/ValueObject/ValueObject.h"
 
 namespace lldb_private {
 
diff --git a/lldb/include/lldb/Core/ValueObjectVTable.h b/lldb/include/lldb/ValueObject/ValueObjectVTable.h
similarity index 98%
rename from lldb/include/lldb/Core/ValueObjectVTable.h
rename to lldb/include/lldb/ValueObject/ValueObjectVTable.h
index 7087dcc1d1bec5..131b5e4c99e4e4 100644
--- a/lldb/include/lldb/Core/ValueObjectVTable.h
+++ b/lldb/include/lldb/ValueObject/ValueObjectVTable.h
@@ -9,7 +9,7 @@
 #ifndef LLDB_CORE_VALUEOBJECTVTABLE_H
 #define LLDB_CORE_VALUEOBJECTVTABLE_H
 
-#include "lldb/Core/ValueObject.h"
+#include "lldb/ValueObject/ValueObject.h"
 
 namespace lldb_private {
 
diff --git a/lldb/include/lldb/Core/ValueObjectVariable.h b/lldb/include/lldb/ValueObject/ValueObjectVariable.h
similarity index 98%
rename from lldb/include/lldb/Core/ValueObjectVariable.h
rename to lldb/include/lldb/ValueObject/ValueObjectVariable.h
index db3847f14a0b5a..1056b1d742b941 100644
--- a/lldb/include/lldb/Core/ValueObjectVariable.h
+++ b/lldb/include/lldb/ValueObject/ValueObjectVariable.h
@@ -9,7 +9,7 @@
 #ifndef LLDB_CORE_VALUEOBJECTVARIABLE_H
 #define LLDB_CORE_VALUEOBJECTVARIABLE_H
 
-#include "lldb/Core/ValueObject.h"
+#include "lldb/ValueObject/ValueObject.h"
 
 #include "lldb/Core/Value.h"
 #include "lldb/Symbol/CompilerType.h"
diff --git a/lldb/source/API/CMakeLists.txt b/lldb/source/API/CMakeLists.txt
index a32bc58507d8eb..d8308841c05dba 100644
--- a/lldb/source/API/CMakeLists.txt
+++ b/lldb/source/API/CMakeLists.txt
@@ -137,6 +137,7 @@ add_lldb_library(liblldb SHARED ${option_framework}
     lldbSymbol
     lldbTarget
     lldbUtility
+    lldbValueObject
     lldbVersion
     ${LLDB_ALL_PLUGINS}
   LINK_COMPONENTS
diff --git a/lldb/source/API/SBBlock.cpp b/lldb/source/API/SBBlock.cpp
index 2577b14920f065..b921ccd9802454 100644
--- a/lldb/source/API/SBBlock.cpp
+++ b/lldb/source/API/SBBlock.cpp
@@ -14,7 +14,6 @@
 #include "lldb/API/SBValue.h"
 #include "lldb/Core/AddressRange.h"
 #include "lldb/Core/AddressRangeListImpl.h"
-#include "lldb/Core/ValueObjectVariable.h"
 #include "lldb/Symbol/Block.h"
 #include "lldb/Symbol/Function.h"
 #include "lldb/Symbol/SymbolContext.h"
@@ -22,6 +21,7 @@
 #include "lldb/Target/StackFrame.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Utility/Instrumentation.h"
+#include "lldb/ValueObject/ValueObjectVariable.h"
 
 using namespace lldb;
 using namespace lldb_private;
diff --git a/lldb/source/API/SBFrame.cpp b/lldb/source/API/SBFrame.cpp
index 30c44b974988d0..dc41e80b457d7d 100644
--- a/lldb/source/API/SBFrame.cpp
+++ b/lldb/source/API/SBFrame.cpp
@@ -17,9 +17,6 @@
 #include "Utils.h"
 #include "lldb/Core/Address.h"
 #include "lldb/Core/Debugger.h"
-#include "lldb/Core/ValueObjectRegister.h"
-#include "lldb/Core/ValueObjectVariable.h"
-#include "lldb/Core/ValueObjectConstResult.h"
 #include "lldb/Expression/ExpressionVariable.h"
 #include "lldb/Expression/UserExpression.h"
 #include "lldb/Host/Host.h"
@@ -41,6 +38,9 @@
 #include "lldb/Utility/Instrumentation.h"
 #include "lldb/Utility/LLDBLog.h"
 #include "lldb/Utility/Stream.h"
+#include "lldb/ValueObject/ValueObjectConstResult.h"
+#include "lldb/ValueObject/ValueObjectRegister.h"
+#include "lldb/ValueObject/ValueObjectVariable.h"
 
 #include "lldb/API/SBAddress.h"
 #include "lldb/API/SBDebugger.h"
diff --git a/lldb/source/API/SBModule.cpp b/lldb/source/API/SBModule.cpp
index 262e26c6bf4318..985107ec68efd4 100644
--- a/lldb/source/API/SBModule.cpp
+++ b/lldb/source/API/SBModule.cpp
@@ -15,8 +15,6 @@
 #include "lldb/API/SBSymbolContextList.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/Section.h"
-#include "lldb/Core/ValueObjectList.h"
-#include "lldb/Core/ValueObjectVariable.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/SymbolFile.h"
 #include "lldb/Symbol/Symtab.h"
@@ -25,6 +23,8 @@
 #include "lldb/Target/Target.h"
 #include "lldb/Utility/Instrumentation.h"
 #include "lldb/Utility/StreamString.h"
+#include "lldb/ValueObject/ValueObjectList.h"
+#include "lldb/ValueObject/ValueObjectVariable.h"
 
 using namespace lldb;
 using namespace lldb_private;
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index d5017ad6bff166..28bdf47a34137a 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -41,9 +41,6 @@
 #include "lldb/Core/SearchFilter.h"
 #include "lldb/Core/Section.h"
 #include "lldb/Core/StructuredDataImpl.h"
-#include "lldb/Core/ValueObjectConstResult.h"
-#include "lldb/Core/ValueObjectList.h"
-#include "lldb/Core/ValueObjectVariable.h"
 #include "lldb/Host/Host.h"
 #include "lldb/Symbol/DeclVendor.h"
 #include "lldb/Symbol/ObjectFile.h"
@@ -63,6 +60,9 @@
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/ProcessInfo.h"
 #include "lldb/Utility/RegularExpression.h"
+#include "lldb/ValueObject/ValueObjectConstResult.h"
+#include "lldb/ValueObject/ValueObjectList.h"
+#include "lldb/ValueObject/ValueObjectVariable.h"
 
 #include "Commands/CommandObjectBreakpoint.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
diff --git a/lldb/source/API/SBThread.cpp b/lldb/source/API/SBThread.cpp
index a99456e06d0329..4e61c83889b0b0 100644
--- a/lldb/source/API/SBThread.cpp
+++ b/lldb/source/API/SBThread.cpp
@@ -24,7 +24,6 @@
 #include "lldb/Breakpoint/BreakpointLocation.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/StructuredDataImpl.h"
-#include "lldb/Core/ValueObject.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/SymbolContext.h"
@@ -43,6 +42,7 @@
 #include "lldb/Utility/State.h"
 #include "lldb/Utility/Stream.h"
 #include "lldb/Utility/StructuredData.h"
+#include "lldb/ValueObject/ValueObject.h"
 #include "lldb/lldb-enumerations.h"
 
 #include <memory>
diff --git a/lldb/source/API/SBType.cpp b/lldb/source/API/SBType.cpp
index 8a063e5ad61d9d..4cc16c64e4756a 100644
--- a/lldb/source/API/SBType.cpp
+++ b/lldb/source/API/SBType.cpp
@@ -13,7 +13,6 @@
 #include "lldb/API/SBStream.h"
 #include "lldb/API/SBTypeEnumMember.h"
 #include "lldb/Core/Mangled.h"
-#include "lldb/Core/ValueObjectConstResult.h"
 #include "lldb/Symbol/CompilerDecl.h"
 #include "lldb/Symbol/CompilerType.h"
 #include "lldb/Symbol/Type.h"
@@ -23,6 +22,7 @@
 #include "lldb/Utility/Instrumentation.h"
 #include "lldb/Utility/Scalar.h"
 #include "lldb/Utility/Stream.h"
+#include "lldb/ValueObject/ValueObjectConstResult.h"
 
 #include "llvm/ADT/APSInt.h"
 #include "llvm/Support...
[truncated]

Copy link

github-actions bot commented Oct 22, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@cmtice
Copy link
Contributor

cmtice commented Oct 22, 2024

It appears that in all the .h files that you moved from Core to ValueObject, you did not update the ifdef variable at the top of the file? I would have expected, e.g. that "LLDB_CORE_VALUEOBJECT_H" should be changed to "LLDB_VALUEOBJECT_VALUEOBJECT_H". Shouldn't it?

@JDevlieghere
Copy link
Member Author

It appears that in all the .h files that you moved from Core to ValueObject, you did not update the ifdef variable at the top of the file? I would have expected, e.g. that "LLDB_CORE_VALUEOBJECT_H" should be changed to "LLDB_VALUEOBJECT_VALUEOBJECT_H". Shouldn't it?

Good point, I forgot the header guards. Fixed.

Copy link
Collaborator

@labath labath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the CMakeLists.txt for Breakpoint and Command libraries is missing a dependency on the ValueObject lib (and they do appear to depend on it).

I can run this on linux to see if we need to increase our cirular dep counter. :P

My main question is: given that this is motivated by making room for the DIL implementation, isn't the name a bit overly specific? Like would you (all) be fine with putting something called DILParser into a directory called "ValueObject"?

(Note that I personally never had a problem with keeping the DIL in the Core library, and with the eviction of ValueObject, the core library gets noticably smaller, so for me, a completely acceptable colution would be to put/keep the DIL in the Core library, and leave the ValueObject library strictly for the ValueObject classes.)

@JDevlieghere
Copy link
Member Author

Given that most of these files start with 1st ValueObject` I felt like that was the better name for the library, rather than DIL which doesn't exist yet. I'm fine with putting the DIL implementation in the new ValueObject library (potentially in a DIL subdirectory) or keep it in Core like you suggested.

@labath
Copy link
Collaborator

labath commented Oct 24, 2024

Given that most of these files start with 1st ValueObject` I felt like that was the better name for the library, rather than DIL which doesn't exist yet. I'm fine with putting the DIL implementation in the new ValueObject library (potentially in a DIL subdirectory) or keep it in Core like you suggested.

Sorry, I didn't mean to imply that the directory should be called DIL -- that would again be too DIL-specific (and vapourware). I was more thinking of a name which was generic enough so it encompasses both. I don't really have a good suggestion, except maybe "Value" (so that you have a ValueObject and and E-value-ator for it sitting next to each other.

That said, now that I've written this, I am starting to think that I'd be fine with an "evaluator" in a directory called "valueobject" as well, so I'm going to stamp this. If you think that "Value" is better, then feel free to rename it to that. Otherwise, this is fine as well.

(I've also checked that this builds on linux with the stricter dep checking)

@cmtice
Copy link
Contributor

cmtice commented Oct 24, 2024

It looks like the CMakeLists.txt for Breakpoint and Command libraries is missing a dependency on the ValueObject lib (and they do appear to depend on it).

It looks like the changes to these CMakeLists.txt (and maybe a few others?) are still missing. Or aren't they needed?

ValueObject is part of lldbCore for historical reasons, but it can
totally stand on its own. This does introduce a circular dependency
between lldbCore and lldbValueObject, which is unfortunate but probably
unavoidable.

The header includes were updated with the following command:

```
find . -type f -exec sed -i.bak "s%include \"lldb/Core/ValueObject%include \"lldb/ValueObject/ValueObject%" '{}' \;
```
@JDevlieghere JDevlieghere force-pushed the separate-out-value-object branch from ba0a7eb to 105d547 Compare October 25, 2024 03:04
@JDevlieghere
Copy link
Member Author

The GitHub UI made it a lot easier to spot missing libraries. I'm pretty sure I've got them all. It doesn't lead to an error because we link everything together anyway, but it's still the right thing to do. I also had to rebase the PR.

@JDevlieghere JDevlieghere merged commit b852fb1 into llvm:main Oct 25, 2024
7 checks passed
@JDevlieghere JDevlieghere deleted the separate-out-value-object branch October 25, 2024 03:20
@frobtech frobtech mentioned this pull request Oct 25, 2024
JDevlieghere added a commit to swiftlang/llvm-project that referenced this pull request Nov 1, 2024
ValueObject is part of lldbCore for historical reasons, but conceptually
it deserves to be its own library. This does introduce a (link-time) circular
dependency between lldbCore and lldbValueObject, which is unfortunate
but probably unavoidable because so many things in LLDB rely on
ValueObject. We already have cycles and these libraries are never built
as dylibs so while this doesn't improve the situation, it also doesn't
make things worse.

The header includes were updated with the following command:

```
find . -type f -exec sed -i.bak "s%include \"lldb/Core/ValueObject%include \"lldb/ValueObject/ValueObject%" '{}' \;
```

(cherry picked from commit b852fb1)
JDevlieghere added a commit to swiftlang/llvm-project that referenced this pull request Nov 2, 2024
[lldb] Move ValueObject into its own library (NFC) (llvm#113393)
NoumanAmir657 pushed a commit to NoumanAmir657/llvm-project that referenced this pull request Nov 4, 2024
ValueObject is part of lldbCore for historical reasons, but conceptually
it deserves to be its own library. This does introduce a (link-time) circular
dependency between lldbCore and lldbValueObject, which is unfortunate
but probably unavoidable because so many things in LLDB rely on
ValueObject. We already have cycles and these libraries are never built
as dylibs so while this doesn't improve the situation, it also doesn't
make things worse.

The header includes were updated with the following command:

```
find . -type f -exec sed -i.bak "s%include \"lldb/Core/ValueObject%include \"lldb/ValueObject/ValueObject%" '{}' \;
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants