Skip to content

Commit 7b519bf

Browse files
committed
rm leading zero const idx
1 parent 5527907 commit 7b519bf

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

clang/lib/CIR/CodeGen/CIRGenExprConst.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,6 @@ bool ConstStructBuilder::Build(const APValue &Val, const RecordDecl *RD,
748748
.getAddressPoint(BaseSubobject(CD, Offset));
749749
assert(!cir::MissingFeatures::ptrAuth());
750750
mlir::ArrayAttr indices = builder.getArrayAttr({
751-
builder.getI32IntegerAttr(0),
752751
builder.getI32IntegerAttr(addressPoint.VTableIndex),
753752
builder.getI32IntegerAttr(addressPoint.AddressPointIndex),
754753
});

clang/test/CIR/CodeGen/vtable-emission.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ void S::key() {}
2020
// LLVM-SAME: [ptr null, ptr @_ZTI1S, ptr @_ZN1S3keyEv, ptr @_ZN1S6nonKeyEv] }, align 8
2121

2222
// CHECK: cir.global external @sobj = #cir.const_struct
23-
// CHECK-SAME: <{#cir.global_view<@_ZTV1S, [0 : i32, 0 : i32, 2 : i32]> :
23+
// CHECK-SAME: <{#cir.global_view<@_ZTV1S, [0 : i32, 2 : i32]> :
2424
// CHECK-SAME: !cir.ptr<!ty_anon_struct1>}> : !ty_anon_struct2 {alignment = 8 : i64}
2525
// LLVM: @sobj = global { ptr } { ptr getelementptr inbounds
2626
// LLVM-SAME: ({ [4 x ptr] }, ptr @_ZTV1S, i32 0, i32 0, i32 2) }, align 8

0 commit comments

Comments
 (0)