Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public Br (LlvmIrVariable cond, LlvmIrFunctionLabelItem ifTrue, LlvmIrFunctionLa
: base (OpName)
{
if (cond.Type != typeof(bool)) {
throw new ArgumentException ($"Internal error: condition must refer to a variable of type 'bool', was 'cond.Type' instead", nameof (cond));
throw new ArgumentException ($"Internal error: condition must refer to a variable of type 'bool', was '{cond.Type}' instead", nameof (cond));
}

this.cond = cond;
Expand Down Expand Up @@ -218,7 +218,7 @@ public Call (LlvmIrFunction function, LlvmIrVariable? result = null, ICollection

if (function.Signature.ReturnType != typeof(void)) {
if (result == null) {
throw new ArgumentNullException ($"Internal error: function '{function.Signature.Name}' returns '{function.Signature.ReturnType} and thus requires a result variable", nameof (result));
throw new ArgumentNullException (nameof (result), $"Internal error: function '{function.Signature.Name}' returns '{function.Signature.ReturnType}' and thus requires a result variable");
}
Comment thread
jonathanpeppers marked this conversation as resolved.
} else if (result != null) {
throw new ArgumentException ($"Internal error: function '{function.Signature.Name}' returns no value and yet a result variable was provided", nameof (result));
Expand All @@ -227,7 +227,7 @@ public Call (LlvmIrFunction function, LlvmIrVariable? result = null, ICollection
int argCount = function.Signature.Parameters.Count;
if (argCount != 0) {
if (arguments == null) {
throw new ArgumentNullException ($"Internal error: function '{function.Signature.Name}' requires {argCount} arguments", nameof (arguments));
throw new ArgumentNullException (nameof (arguments), $"Internal error: function '{function.Signature.Name}' requires {argCount} arguments");
}

if (function.UsesVarArgs) {
Expand Down