As suggested on rG937c4cffd024, use llvm_unreachable for unhandled integer types (which shouldn't be possible) instead of breaking and dropping down to the existing fatal error handler.
Helps silence static analyzer warnings.
case 32: return &ffi_type_sint32;
case 64: return &ffi_type_sint64;
}
+ llvm_unreachable("Unhandled integer type bitwidth");
case Type::FloatTyID: return &ffi_type_float;
case Type::DoubleTyID: return &ffi_type_double;
case Type::PointerTyID: return &ffi_type_pointer;
return ArgDataPtr;
}
}
- break;
+ llvm_unreachable("Unhandled integer type bitwidth");
case Type::FloatTyID: {
float *FloatPtr = (float *) ArgDataPtr;
*FloatPtr = AV.FloatVal;