mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[silgen] Mark a bunch of functions that SILGen open-codeds as "auto-generated" and thus not user generated code.
This ensures that we do not emit diagnostics onto these functions. I noticed we were doing this with my work on opt-remarks when I was hitting diagnostics in these functions in a set of subsequent commits. The way that I found these is that I went through this file and looked for any cases where we were never calling emitStmt on a user provided function body. I also eliminated two places where we were setting a new DebugScope even though preEmitFunction already does that for us.
This commit is contained in:
@@ -538,7 +538,8 @@ public:
|
||||
/// it may have been generated from. These locations will have an artificial
|
||||
/// line location of zero in DWARF, but in CodeView we want to use the given
|
||||
/// line since line zero does not represent an artificial line in CodeView.
|
||||
static RegularLocation getAutoGeneratedLocation(SourceLoc L) {
|
||||
template <typename InputLocTy>
|
||||
static RegularLocation getAutoGeneratedLocation(InputLocTy L) {
|
||||
RegularLocation AL(L);
|
||||
AL.markAutoGenerated();
|
||||
return AL;
|
||||
|
||||
Reference in New Issue
Block a user