Skip to content

Commit 74a65be

Browse files
committed
LLVM_UTILS: Throw error for unsupported overload_id
This fixes the build warnings
1 parent e224b02 commit 74a65be

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/libasr/codegen/llvm_utils.cpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -1485,7 +1485,8 @@ namespace LCompilers {
14851485
break;
14861486
}
14871487
default: {
1488-
// can exit with error
1488+
throw LCompilersException("LLVMUtils::is_ineq_by_value unsupported overload_id " +
1489+
std::to_string(overload_id));
14891490
}
14901491
}
14911492
return builder->CreateCmp(pred, left, right);
@@ -1509,7 +1510,8 @@ namespace LCompilers {
15091510
break;
15101511
}
15111512
default: {
1512-
// can exit with error
1513+
throw LCompilersException("LLVMUtils::is_ineq_by_value unsupported overload_id " +
1514+
std::to_string(overload_id));
15131515
}
15141516
}
15151517
return builder->CreateCmp(pred, left, right);
@@ -1556,7 +1558,8 @@ namespace LCompilers {
15561558
break;
15571559
}
15581560
default: {
1559-
// can exit with error
1561+
throw LCompilersException("LLVMUtils::is_ineq_by_value unsupported overload_id " +
1562+
std::to_string(overload_id));
15601563
}
15611564
}
15621565
cond = builder->CreateAnd(cond, builder->CreateCmp(pred, l, r));

0 commit comments

Comments
 (0)