[Lldb-commits] [clang] [lldb] [clang] remove IsDefaulted bit from TemplateArgument (PR #155120)
Matheus Izvekov via lldb-commits
lldb-commits at lists.llvm.org
Sat Aug 23 18:29:53 PDT 2025
================
@@ -95,24 +95,25 @@ TC
<int,
// CHECK: [[TCNARG2]] = !DITemplateValueParameter(type: [[INT]], value: i32 -3)
-3,
-// CHECK: [[TCNARG3]] = !DITemplateValueParameter(name: "x", type: [[CINTPTR]], value: i8 0)
+// CHECK: [[TCNARG3]] = !DITemplateValueParameter(name: "x", type: [[CINTPTR]], value: ptr null)
nullptr,
// The interesting null pointer: -1 for member data pointers (since they are
// just an offset in an object, they can be zero and non-null for the first
// member)
-// CHECK: [[TCNARG4]] = !DITemplateValueParameter(name: "a", type: [[MEMINTPTR]], value: i64 -1)
+// CHECK: [[TCNARG4]] = !DITemplateValueParameter(name: "a", type: [[FOO_MEM:![0-9]*]], value: i64 -1)
+// CHECK: [[FOO_MEM]] = !DIDerivedType(tag: DW_TAG_typedef, name: "foo_mem", {{.*}}baseType: [[MEMINTPTR]])
nullptr,
//
// In some future iteration we could possibly emit the value of a null member
// function pointer as '{ i64, i64 } zeroinitializer' as it may be handled
// naturally from the LLVM CodeGen side once we decide how to handle non-null
// member function pointers. For now, it's simpler just to emit the 'i8 0'.
----------------
mizvekov wrote:
I think this may still be a problem, doesn't just show up in this test anymore because we use the as-written template argument expression, but it probably does still happen for defaulted template arguments, as that still should use the converted template argument.
So I will probably just update that comment to mention that.
https://github.com/llvm/llvm-project/pull/155120
More information about the lldb-commits
mailing list