Commit Graph

2 Commits

Author SHA1 Message Date
Michael Gottesman
19c72acff6 [silgen] Emit the location of the original function def if SILGen is erroring on a duplicate symbol definition.
This diagnostic is useful around silgen_name where it validates that we do not
have any weird collisions. Sadly, it just points where one of the conflicting
elements is... with this patch, we also emit an error on the other function if
we have a SILLocation.
2024-04-01 22:01:08 -07:00
Erik Eckstein
dccaa8f01f diagnose duplicated @_cdecl and @_silgen_name function names
Prints a regular error instead of crashing.
The check is done in SILGen, because it's simple. We could also do it earlier, but I don't see a strong reason for this.

rdar://75950093
2021-03-31 13:30:22 +02:00