case Stage::calculate_types:
{
auto &state = get_id_state(instruction.result);
+ if(!state.decorations.empty())
+ throw Parser_error(instruction_start_index,
+ instruction_start_index,
+ "decorations on instruction not implemented: "
+ + std::string(get_enumerant_name(instruction.get_operation())));
state.type = std::make_shared<Simple_type_descriptor>(
state.decorations, LLVM_type_and_alignment(::LLVMVoidTypeInContext(context), 1));
break;
case Stage::calculate_types:
{
auto &state = get_id_state(instruction.result);
+ if(!state.decorations.empty())
+ throw Parser_error(instruction_start_index,
+ instruction_start_index,
+ "decorations on instruction not implemented: "
+ + std::string(get_enumerant_name(instruction.get_operation())));
switch(instruction.width)
{
case 8:
case Stage::calculate_types:
{
auto &state = get_id_state(instruction.result);
+ if(!state.decorations.empty())
+ throw Parser_error(instruction_start_index,
+ instruction_start_index,
+ "decorations on instruction not implemented: "
+ + std::string(get_enumerant_name(instruction.get_operation())));
::LLVMTypeRef type = nullptr;
switch(instruction.width)
{
case Stage::calculate_types:
{
auto &state = get_id_state(instruction.result);
+ if(!state.decorations.empty())
+ throw Parser_error(instruction_start_index,
+ instruction_start_index,
+ "decorations on instruction not implemented: "
+ + std::string(get_enumerant_name(instruction.get_operation())));
state.type = std::make_shared<Vector_type_descriptor>(
state.decorations,
get_type<Simple_type_descriptor>(instruction.component_type, instruction_start_index),
case Stage::calculate_types:
{
auto &state = get_id_state(instruction.result);
+ if(!state.decorations.empty())
+ throw Parser_error(instruction_start_index,
+ instruction_start_index,
+ "decorations on instruction not implemented: "
+ + std::string(get_enumerant_name(instruction.get_operation())));
state.type = std::make_shared<Matrix_type_descriptor>(
state.decorations,
get_type<Vector_type_descriptor>(instruction.column_type, instruction_start_index),
case Stage::calculate_types:
{
auto &state = get_id_state(instruction.result);
+ if(!state.decorations.empty())
+ throw Parser_error(instruction_start_index,
+ instruction_start_index,
+ "decorations on instruction not implemented: "
+ + std::string(get_enumerant_name(instruction.get_operation())));
auto length = get_unsigned_integer_constant(instruction.length, instruction_start_index);
if(length <= 0)
throw Parser_error(instruction_start_index,
case Stage::calculate_types:
{
auto &state = get_id_state(instruction.result);
+ if(!state.decorations.empty())
+ throw Parser_error(instruction_start_index,
+ instruction_start_index,
+ "decorations on instruction not implemented: "
+ + std::string(get_enumerant_name(instruction.get_operation())));
if(!state.type)
{
state.type = std::make_shared<Pointer_type_descriptor>(
for(Id_ref type : instruction.parameter_0_type_parameter_1_type)
args.push_back(get_type(type, instruction_start_index));
auto &state = get_id_state(instruction.result);
+ if(!state.decorations.empty())
+ throw Parser_error(instruction_start_index,
+ instruction_start_index,
+ "decorations on instruction not implemented: "
+ + std::string(get_enumerant_name(instruction.get_operation())));
state.type = std::make_shared<Function_type_descriptor>(
state.decorations,
get_type(instruction.return_type, instruction_start_index),
type->get_base_type()->get_or_make_type().type,
get_name(instruction.result).c_str()),
type);
- ::LLVMSetAlignment(state.value->value, type->get_base_type()->get_or_make_type().alignment);
+ ::LLVMSetAlignment(state.value->value,
+ type->get_base_type()->get_or_make_type().alignment);
return;
}
case Storage_class::generic:
"OpStore nontemporal not implemented");
auto &object_value = get_id_state(instruction.object).value.value();
auto &pointer_value = get_id_state(instruction.pointer).value.value();
- ::LLVMSetAlignment(::LLVMBuildStore(builder.get(),
- object_value.value,
- pointer_value.value), object_value.type->get_or_make_type().alignment);
+ ::LLVMSetAlignment(::LLVMBuildStore(builder.get(), object_value.value, pointer_value.value),
+ object_value.type->get_or_make_type().alignment);
break;
}
}