@@ -716,7 +716,7 @@ static void destructureIndices(Type currType, ArrayRef<GEPArg> indices,
716716 dynamicIndices.push_back (val);
717717 }
718718 } else {
719- rawConstantIndices.push_back (iter. get <GEPConstantIndex>());
719+ rawConstantIndices.push_back (cast <GEPConstantIndex>(iter ));
720720 }
721721
722722 // Skip for very first iteration of this loop. First index does not index
@@ -805,7 +805,7 @@ static void printGEPIndices(OpAsmPrinter &printer, LLVM::GEPOp gepOp,
805805 if (Value val = llvm::dyn_cast_if_present<Value>(cst))
806806 printer.printOperand (val);
807807 else
808- printer << cst. get <IntegerAttr>().getInt ();
808+ printer << cast <IntegerAttr>(cst ).getInt ();
809809 });
810810}
811811
@@ -821,11 +821,11 @@ verifyStructIndices(Type baseGEPType, unsigned indexPos,
821821
822822 return TypeSwitch<Type, LogicalResult>(baseGEPType)
823823 .Case <LLVMStructType>([&](LLVMStructType structType) -> LogicalResult {
824- if (!indices[indexPos]. is <IntegerAttr>())
824+ if (!isa <IntegerAttr>(indices[indexPos] ))
825825 return emitOpError () << " expected index " << indexPos
826826 << " indexing a struct to be constant" ;
827827
828- int32_t gepIndex = indices[indexPos]. get <IntegerAttr>().getInt ();
828+ int32_t gepIndex = cast <IntegerAttr>(indices[indexPos] ).getInt ();
829829 ArrayRef<Type> elementTypes = structType.getBody ();
830830 if (gepIndex < 0 ||
831831 static_cast <size_t >(gepIndex) >= elementTypes.size ())
@@ -1100,11 +1100,11 @@ CallInterfaceCallable CallOp::getCallableForCallee() {
11001100void CallOp::setCalleeFromCallable (CallInterfaceCallable callee) {
11011101 // Direct call.
11021102 if (FlatSymbolRefAttr calleeAttr = getCalleeAttr ()) {
1103- auto symRef = callee. get <SymbolRefAttr>();
1103+ auto symRef = cast <SymbolRefAttr>(callee );
11041104 return setCalleeAttr (cast<FlatSymbolRefAttr>(symRef));
11051105 }
11061106 // Indirect call, callee Value is the first operand.
1107- return setOperand (0 , callee. get <Value>());
1107+ return setOperand (0 , cast <Value>(callee ));
11081108}
11091109
11101110Operation::operand_range CallOp::getArgOperands () {
@@ -1564,11 +1564,11 @@ CallInterfaceCallable InvokeOp::getCallableForCallee() {
15641564void InvokeOp::setCalleeFromCallable (CallInterfaceCallable callee) {
15651565 // Direct call.
15661566 if (FlatSymbolRefAttr calleeAttr = getCalleeAttr ()) {
1567- auto symRef = callee. get <SymbolRefAttr>();
1567+ auto symRef = cast <SymbolRefAttr>(callee );
15681568 return setCalleeAttr (cast<FlatSymbolRefAttr>(symRef));
15691569 }
15701570 // Indirect call, callee Value is the first operand.
1571- return setOperand (0 , callee. get <Value>());
1571+ return setOperand (0 , cast <Value>(callee ));
15721572}
15731573
15741574Operation::operand_range InvokeOp::getArgOperands () {
@@ -3259,7 +3259,7 @@ OpFoldResult LLVM::GEPOp::fold(FoldAdaptor adaptor) {
32593259 if (Value val = llvm::dyn_cast_if_present<Value>(existing))
32603260 gepArgs.emplace_back (val);
32613261 else
3262- gepArgs.emplace_back (existing. get <IntegerAttr>().getInt ());
3262+ gepArgs.emplace_back (cast <IntegerAttr>(existing ).getInt ());
32633263
32643264 continue ;
32653265 }
0 commit comments