llvm: avoid crash on duplicate asm input/output name
This commit is contained in:
parent
3525b8778e
commit
fdf4c875ff
|
@ -5972,7 +5972,9 @@ pub const FuncGen = struct {
|
|||
}
|
||||
|
||||
if (!std.mem.eql(u8, name, "_")) {
|
||||
name_map.putAssumeCapacityNoClobber(name, total_i);
|
||||
const gop = name_map.getOrPutAssumeCapacity(name);
|
||||
if (gop.found_existing) return self.todo("duplicate asm output name '{s}'", .{name});
|
||||
gop.value_ptr.* = total_i;
|
||||
}
|
||||
total_i += 1;
|
||||
}
|
||||
|
@ -6028,7 +6030,9 @@ pub const FuncGen = struct {
|
|||
}
|
||||
|
||||
if (!std.mem.eql(u8, name, "_")) {
|
||||
name_map.putAssumeCapacityNoClobber(name, total_i);
|
||||
const gop = name_map.getOrPutAssumeCapacity(name);
|
||||
if (gop.found_existing) return self.todo("duplicate asm input name '{s}'", .{name});
|
||||
gop.value_ptr.* = total_i;
|
||||
}
|
||||
|
||||
// In the case of indirect inputs, LLVM requires the callsite to have
|
||||
|
|
Loading…
Reference in New Issue
Block a user