================
@@ -0,0 +1,128 @@
+// REQUIRES: lld
+
+// Test that simple types can be found
+// RUN: %build --std=c++20 --nodefaultlib --arch=64 -o %t.exe -- %s
+// RUN: lldb-test symbols %t.exe | FileCheck %s
+
+bool *PB;
+bool &RB = *PB;
+bool *&RPB = PB;
+const bool &CRB = RB;
+bool *const BC = 0;
+const bool *const CBC = 0;
+
+long AL[2];
+
+const volatile short CVS = 0;
+const short CS = 0;
+volatile short VS;
+
+struct ReturnedStruct1 {};
+struct ReturnedStruct2 {};
+
+struct MyStruct {
+ static ReturnedStruct1 static_fn(char *) { return {}; }
+ ReturnedStruct2 const_member_fn(char *) const { return {}; }
+ void volatile_member_fn() volatile {};
+ void member_fn() {};
+};
+
+void (*PF)(int, bool *, const float, ...);
----------------
Nerixyz wrote:
> This variable seems unused.
It's unused, but still in the binary, because it's neither `static` nor
`inline`. And it is present in the debug info.
> Can we add a test case to show what you mean by return and parameters
> missing? What would the typename look like?
The type of the function itself gets created. This is checked at the bottom of
the file:
> ```
> // CHECK-DAG: Type{{.*}} , size = 0, compiler_type = 0x{{[0-9a-f]+}} void
> (int, _Bool *, const float, ...)
> // CHECK-DAG: Type{{.*}} , size = 8, compiler_type = 0x{{[0-9a-f]+}} void
> (*)(int, _Bool *, const float, ...)
> ```
However, the LLDB `Type`s for simple/primitive types don't get created. I
updated the test and moved `double` to a function parameter. Now, it's not
created as an LLDB `Type` with the native plugin. DWARF and DIA do create a
`Type`.
https://github.com/llvm/llvm-project/pull/156250
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits