[Lldb-commits] [lldb] [lldb] Upstream arm64e support in ValueObject (PR #186906)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 16 15:46:40 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,c,h -- lldb/test/API/lang/c/ptrauth/main.c lldb/include/lldb/Symbol/CompilerType.h lldb/include/lldb/Symbol/TypeSystem.h lldb/include/lldb/ValueObject/ValueObject.h lldb/source/DataFormatters/ValueObjectPrinter.cpp lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h lldb/source/Symbol/CompilerType.cpp lldb/source/ValueObject/ValueObject.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lldb/include/lldb/Symbol/TypeSystem.h b/lldb/include/lldb/Symbol/TypeSystem.h
index 07ca4a8fa..b3404de2a 100644
--- a/lldb/include/lldb/Symbol/TypeSystem.h
+++ b/lldb/include/lldb/Symbol/TypeSystem.h
@@ -203,8 +203,7 @@ public:
virtual bool IsVoidType(lldb::opaque_compiler_type_t type) = 0;
- virtual bool
- HasPointerAuthQualifier(lldb::opaque_compiler_type_t type) {
+ virtual bool HasPointerAuthQualifier(lldb::opaque_compiler_type_t type) {
return false;
}
diff --git a/lldb/source/ValueObject/ValueObject.cpp b/lldb/source/ValueObject/ValueObject.cpp
index 4fb4cc5e1..5b343848d 100644
--- a/lldb/source/ValueObject/ValueObject.cpp
+++ b/lldb/source/ValueObject/ValueObject.cpp
@@ -25,6 +25,7 @@
#include "lldb/Symbol/SymbolContext.h"
#include "lldb/Symbol/Type.h"
#include "lldb/Symbol/Variable.h"
+#include "lldb/Target/ABI.h"
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Target/Language.h"
#include "lldb/Target/LanguageRuntime.h"
@@ -33,7 +34,6 @@
#include "lldb/Target/Target.h"
#include "lldb/Target/Thread.h"
#include "lldb/Target/ThreadList.h"
-#include "lldb/Target/ABI.h"
#include "lldb/Utility/DataBuffer.h"
#include "lldb/Utility/DataBufferHeap.h"
#include "lldb/Utility/Flags.h"
@@ -1627,8 +1627,7 @@ ValueObject::GetAddressOf(bool scalar_is_load_address) {
llvm_unreachable("Unhandled value type!");
}
-std::optional<addr_t>
-ValueObject::GetStrippedPointerValue(addr_t address) {
+std::optional<addr_t> ValueObject::GetStrippedPointerValue(addr_t address) {
if (GetCompilerType().HasPointerAuthQualifier()) {
ExecutionContext exe_ctx(GetExecutionContextRef());
if (Process *process = exe_ctx.GetProcessPtr())
diff --git a/lldb/test/API/lang/c/ptrauth/main.c b/lldb/test/API/lang/c/ptrauth/main.c
index 3087a35e1..6b1530b23 100644
--- a/lldb/test/API/lang/c/ptrauth/main.c
+++ b/lldb/test/API/lang/c/ptrauth/main.c
@@ -4,24 +4,23 @@
#error Provide these constants if you port this test
#endif
-int * __ptrauth(VALID_DATA_KEY) valid0;
+int *__ptrauth(VALID_DATA_KEY) valid0;
typedef int *intp;
int nonConstantGlobal = 5;
-
-int * __ptrauth(VALID_DATA_KEY) valid0;
-int * __ptrauth(VALID_DATA_KEY) *valid1;
+int *__ptrauth(VALID_DATA_KEY) valid0;
+int *__ptrauth(VALID_DATA_KEY) * valid1;
__ptrauth(VALID_DATA_KEY) intp valid2;
__ptrauth(VALID_DATA_KEY) intp *valid3;
intp __ptrauth(VALID_DATA_KEY) valid4;
-intp __ptrauth(VALID_DATA_KEY) *valid5;
-int * __ptrauth(VALID_DATA_KEY, 0) valid6;
-int * __ptrauth(VALID_DATA_KEY, 1) valid7;
-int * __ptrauth(VALID_DATA_KEY, (_Bool) 1) valid8;
-int * __ptrauth(VALID_DATA_KEY, 1, 0) valid9;
-int * __ptrauth(VALID_DATA_KEY, 1, 65535) valid10;
+intp __ptrauth(VALID_DATA_KEY) * valid5;
+int *__ptrauth(VALID_DATA_KEY, 0) valid6;
+int *__ptrauth(VALID_DATA_KEY, 1) valid7;
+int *__ptrauth(VALID_DATA_KEY, (_Bool)1) valid8;
+int *__ptrauth(VALID_DATA_KEY, 1, 0) valid9;
+int *__ptrauth(VALID_DATA_KEY, 1, 65535) valid10;
void test_code(intp p) {
__ptrauth(VALID_DATA_KEY) intp pSpecial = p;
@@ -36,7 +35,6 @@ void test_code(intp p) {
intp __ptrauth(VALID_DATA_KEY) *ppSpecial0 = &pSpecial;
intp *ppNormal1 = &pNormal;
-
}
void test_array(void) {
@@ -47,7 +45,7 @@ void test_array(void) {
int printf(const char *, ...);
-int main(int argc, char ** argv) {
+int main(int argc, char **argv) {
valid0 = &nonConstantGlobal;
valid1 = &valid0;
valid2 = &nonConstantGlobal;
@@ -63,7 +61,7 @@ int main(int argc, char ** argv) {
//% substrs=['(__ptrauth(2,0,0) intp *)', 'valid3 ='])
//% self.expect("target var valid4",
//% substrs=['(__ptrauth(2,0,0) intp)', 'valid4 =', '(actual=0x'])
- int (*f)(int, char**) = main;
+ int (*f)(int, char **) = main;
test_code(valid4);
test_code(valid4);
test_array();
``````````
</details>
https://github.com/llvm/llvm-project/pull/186906
More information about the lldb-commits
mailing list