Skip to content

Commit d303eee

Browse files
committed
Change unwind to unwindDI to allow nulls
1 parent c2324e1 commit d303eee

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

llvm/include/llvm-c/DebugInfo.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -751,9 +751,9 @@ LLVMMetadataRef LLVMDIBuilderCreateSubrangeType(
751751
* \param Subscripts Subscripts.
752752
* \param NumSubscripts Number of subscripts.
753753
* \param DataLocation DataLocation.
754-
* \param Associated Associated (not NULL).
755-
* \param Allocated Allocated (not NULL).
756-
* \param Rank Rank (not NULL).
754+
* \param Associated Associated.
755+
* \param Allocated Allocated.
756+
* \param Rank Rank.
757757
* \param BitStride BitStride.
758758
*/
759759
LLVMMetadataRef LLVMDIBuilderCreateDynamicArrayType(

llvm/lib/IR/DebugInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1355,8 +1355,8 @@ LLVMMetadataRef LLVMDIBuilderCreateDynamicArrayType(
13551355
return wrap(unwrap(Builder)->createArrayType(
13561356
unwrapDI<DIScope>(Scope), {Name, NameLen}, unwrapDI<DIFile>(File), LineNo,
13571357
Size, AlignInBits, unwrapDI<DIType>(Ty), Subs,
1358-
unwrapDI<DIExpression>(DataLocation), unwrap<DIExpression>(Associated),
1359-
unwrap<DIExpression>(Allocated), unwrap<DIExpression>(Rank),
1358+
unwrapDI<DIExpression>(DataLocation), unwrapDI<DIExpression>(Associated),
1359+
unwrapDI<DIExpression>(Allocated), unwrapDI<DIExpression>(Rank),
13601360
unwrap(BitStride)));
13611361
}
13621362

llvm/test/Bindings/llvm-c/debug_info_new_format.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
; CHECK-NEXT: !36 = !DISubrangeType(name: "foo", scope: !1, file: !1, line: 42, size: 64, baseType: !6, lowerBound: i64 0, upperBound: i64 1, stride: i64 8, bias: i64 4)
7373
; CHECK-NEXT: !37 = !DIDerivedType(tag: DW_TAG_set_type, name: "enumset", scope: !1, file: !1, line: 42, baseType: !3, size: 64)
7474
; CHECK-NEXT: !38 = !DIDerivedType(tag: DW_TAG_set_type, name: "subrangeset", scope: !1, file: !1, line: 42, baseType: !36, size: 64)
75-
; CHECK-NEXT: !39 = !DICompositeType(tag: DW_TAG_array_type, name: "foo", scope: !1, file: !1, line: 42, baseType: !6, size: 640, elements: !40, dataLocation: !DIExpression(), associated: !DIExpression(), allocated: !DIExpression(), rank: !DIExpression())
75+
; CHECK-NEXT: !39 = !DICompositeType(tag: DW_TAG_array_type, name: "foo", scope: !1, file: !1, line: 42, baseType: !6, size: 640, elements: !40, dataLocation: !DIExpression())
7676
; CHECK-NEXT: !40 = !{!41}
7777
; CHECK-NEXT: !41 = !DISubrange(count: 10, lowerBound: 0)
7878
; CHECK-NEXT: !42 = !DICompositeType(tag: DW_TAG_class_type, name: "Class", scope: !4, file: !1, size: 192, flags: DIFlagFwdDecl, elements: !43, identifier: "FooClass")

llvm/tools/llvm-c-test/debuginfo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ int llvm_test_dibuilder(void) {
264264
LLVMMetadataRef L = LLVMDIBuilderCreateExpression(DIB, NULL, 0);
265265
LLVMMetadataRef DynamicArrayMetadataTy = LLVMDIBuilderCreateDynamicArrayType(
266266
DIB, File, "foo", 3, 42, File, 64 * 10, 0, Int64Ty, DynSubscripts, 1, L,
267-
L, L, L, NULL);
267+
NULL, NULL, NULL, NULL);
268268
LLVMAddNamedMetadataOperand(
269269
M, "DynType",
270270
LLVMMetadataAsValue(LLVMGetModuleContext(M), DynamicArrayMetadataTy));

0 commit comments

Comments
 (0)