@@ -258,10 +258,10 @@ m_attributeLists[6] = argAttrList.addFnAttributes(context, attrBuilder);
258258}
259259}
260260
261- StructBackedType* StructBackedType::get (::llvm::LLVMContext & ctx, uint32_t field0, uint32_t field1, uint32_t field2) {
262-
261+ StructBackedType* StructBackedType::get (::llvm::LLVMContext & ctx, uint32_t field0, uint8_t field1, VectorKind field2) {
263262
264263
264+ static_assert (sizeof (field2) <= sizeof (unsigned ));
265265 std::string name; ::llvm::raw_string_ostream os (name);
266266 os << " struct.backed" ;
267267 os << ' .' << (uint64_t )field0;
@@ -270,20 +270,20 @@ StructBackedType* StructBackedType::get(::llvm::LLVMContext & ctx, uint32_t fiel
270270 ::std::vector<::llvm::Type*> fields;
271271 fields.push_back (::llvm::IntegerType::get (ctx, 41 ));
272272
273- if (field0 == 0 )
273+ if (( uint64_t ) field0 == 0 )
274274 fields.push_back (::llvm::StructType::get (ctx));
275275 else
276- fields.push_back (::llvm::IntegerType::get (ctx, field0));
276+ fields.push_back (::llvm::IntegerType::get (ctx, ( uint64_t ) field0));
277277
278- if (field1 == 0 )
278+ if (( uint64_t ) field1 == 0 )
279279 fields.push_back (::llvm::StructType::get (ctx));
280280 else
281- fields.push_back (::llvm::IntegerType::get (ctx, field1));
281+ fields.push_back (::llvm::IntegerType::get (ctx, ( uint64_t ) field1));
282282
283- if (field2 == 0 )
283+ if (( uint64_t ) field2 == 0 )
284284 fields.push_back (::llvm::StructType::get (ctx));
285285 else
286- fields.push_back (::llvm::IntegerType::get (ctx, field2));
286+ fields.push_back (::llvm::IntegerType::get (ctx, ( uint64_t ) field2));
287287 auto *st = ::llvm::StructType::create (ctx, fields, os.str (), /* isPacked=*/ false );
288288 return static_cast <StructBackedType *>(st);
289289}
0 commit comments