[llvm] [cross-project] Add tests for LLDB data-formatters for llvm::ArrayRef (PR #173238)

Michael Buch via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 8 04:12:40 PST 2026


================
@@ -0,0 +1,25 @@
+# RUN: split-file %s %t
+# RUN: lldb -b -x -o 'command script import %llvm_src_root/utils/lldbDataFormatters.py' -s %t/commands.input %llvm_tools_dir/check-lldb-llvm-support-arrayref | FileCheck %t/checks
+
+#--- commands.input
+b main
+run
+p ArrayRef
+p MutableArrayRef
+
+#--- checks
+# CHECK:      (lldb) p ArrayRef
+# CHECK-NEXT: (llvm::ArrayRef<int>) size=3 {
----------------
Michael137 wrote:

Hmm interesting, looks like it's this:
```
1 location added to breakpoint 1
```

That would happen on Linux when LLDB finds the breakpoint on `main` when the process is launched. Might be due to machine load/LLDB sluggishness that the output is printed later than expected. We can probably remove the check for `p ArrayRef`. Or not make it a `CHECK-NEXT`.

https://github.com/llvm/llvm-project/pull/173238


More information about the llvm-commits mailing list