@@ -689,7 +689,7 @@ LLVMToSPIRVDbgTran::transDbgArrayTypeOpenCL(const DICompositeType *AT) {
689
689
SPIRVWordVec LowerBounds (N);
690
690
for (unsigned I = 0 ; I < N; ++I) {
691
691
DISubrange *SR = cast<DISubrange>(AR[I]);
692
- ConstantInt *Count = SR-> getCount (). get <ConstantInt *>();
692
+ ConstantInt *Count = cast <ConstantInt *>(SR-> getCount () );
693
693
if (AT->isVector ()) {
694
694
assert (N == 1 && " Multidimensional vector is not expected!" );
695
695
Ops[ComponentCountIdx] = static_cast <SPIRVWord>(Count->getZExtValue ());
@@ -710,7 +710,7 @@ LLVMToSPIRVDbgTran::transDbgArrayTypeOpenCL(const DICompositeType *AT) {
710
710
if (auto *DIExprLB = dyn_cast<MDNode>(RawLB))
711
711
LowerBounds[I] = transDbgEntry (DIExprLB)->getId ();
712
712
else {
713
- ConstantInt *ConstIntLB = SR-> getLowerBound (). get <ConstantInt *>();
713
+ ConstantInt *ConstIntLB = cast <ConstantInt *>(SR-> getLowerBound () );
714
714
LowerBounds[I] = SPIRVWriter->transValue (ConstIntLB, nullptr )->getId ();
715
715
}
716
716
} else {
@@ -733,7 +733,7 @@ LLVMToSPIRVDbgTran::transDbgArrayTypeNonSemantic(const DICompositeType *AT) {
733
733
Ops.resize (SubrangesIdx + N);
734
734
for (unsigned I = 0 ; I < N; ++I) {
735
735
DISubrange *SR = cast<DISubrange>(AR[I]);
736
- ConstantInt *Count = SR-> getCount (). get <ConstantInt *>();
736
+ ConstantInt *Count = cast <ConstantInt *>(SR-> getCount () );
737
737
if (AT->isVector ()) {
738
738
assert (N == 1 && " Multidimensional vector is not expected!" );
739
739
Ops[ComponentCountIdx] = static_cast <SPIRVWord>(Count->getZExtValue ());
@@ -809,13 +809,13 @@ SPIRVEntry *LLVMToSPIRVDbgTran::transDbgSubrangeType(const DISubrange *ST) {
809
809
ConstantInt *IntNode = nullptr ;
810
810
switch (Idx) {
811
811
case LowerBoundIdx:
812
- IntNode = ST-> getLowerBound (). get <ConstantInt *>();
812
+ IntNode = cast <ConstantInt *>(ST-> getLowerBound () );
813
813
break ;
814
814
case UpperBoundIdx:
815
- IntNode = ST-> getUpperBound (). get <ConstantInt *>();
815
+ IntNode = cast <ConstantInt *>(ST-> getUpperBound () );
816
816
break ;
817
817
case CountIdx:
818
- IntNode = ST-> getCount (). get <ConstantInt *>();
818
+ IntNode = cast <ConstantInt *>(ST-> getCount () );
819
819
break ;
820
820
}
821
821
Ops[Idx] = IntNode ? SPIRVWriter->transValue (IntNode, nullptr )->getId ()
@@ -830,7 +830,7 @@ SPIRVEntry *LLVMToSPIRVDbgTran::transDbgSubrangeType(const DISubrange *ST) {
830
830
Ops[StrideIdx] = transDbgEntry (Node)->getId ();
831
831
else
832
832
Ops[StrideIdx] =
833
- SPIRVWriter->transValue (ST-> getStride (). get <ConstantInt *>(), nullptr )
833
+ SPIRVWriter->transValue (cast <ConstantInt *>(ST-> getStride () ), nullptr )
834
834
->getId ();
835
835
}
836
836
return BM->addDebugInfo (SPIRVDebug::TypeSubrange, getVoidTy (), Ops);
0 commit comments