lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
Type LLVMTypeConverter::packFunctionResults(ArrayRef<Type> types) {
  assert(!types.empty() && "expected non-empty list of type");

  if (types.size() == 1)
    return convertType(types.front());

  SmallVector<LLVM::LLVMType, 8> resultTypes;
  resultTypes.reserve(types.size());
  for (auto t : types) {
    auto converted = convertType(t).dyn_cast<LLVM::LLVMType>();
    if (!converted)
      return {};
    resultTypes.push_back(converted);
  }

  return LLVM::LLVMType::getStructTy(llvmDialect, resultTypes);
}
// Create an LLVM IR structure type if there is more than one result.
Create an LLVM IR structure type if there is more than one result.
Create an LLVM IR structure type if there is more than one result .
Type LLVMTypeConverter::packFunctionResults(ArrayRef<Type> types) {
  assert(!types.empty() && "expected non-empty list of type");
  if (types.size() == 1)
    return convertType(types.front());
  SmallVector<LLVM::LLVMType, 8> resultTypes;
  resultTypes.reserve(types.size());
  for (auto t : types) {
    auto converted = convertType(t).dyn_cast<LLVM::LLVMType>();
    if (!converted)
      return {};
    resultTypes.push_back(converted);
  }
  return LLVM::LLVMType::getStructTy(llvmDialect, resultTypes);
}
Type LLVMTypeConverter :: packFunctionResults ( ArrayRef < Type > types ) { assert ( ! types . empty ( ) && " " ) ; if ( types . size ( ) == 1 ) return convertType ( types . front ( ) ) ; SmallVector < LLVM :: LLVMType , 8 > resultTypes ; resultTypes . reserve ( types . size ( ) ) ; for ( auto t : types ) { auto converted = convertType ( t ) . dyn_cast < LLVM :: LLVMType > ( ) ; if ( ! converted ) return { } ; resultTypes . push_back ( converted ) ; } return LLVM :: LLVMType :: getStructTy ( llvmDialect , resultTypes ) ; }
Create an LLVM IR structure type if there is more than one result.
Create an LLVM IR structure type if there is more than one result .