Skip to content

Commit 8448da3

Browse files
committed
Use MSF not mainInputFilenameForDebugInfo
1 parent 5c83732 commit 8448da3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/FrontendTool/FrontendTool.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,9 +1219,10 @@ static bool performCompileStepsPostSILGen(
12191219
SILOptions &SILOpts = Invocation.getSILOptions();
12201220
IRGenOptions &IRGenOpts = Invocation.getIRGenOptions();
12211221

1222-
#error use ModuleOrSourceFile w/ unique pointer?
1223-
BufferIndirectlyCausingDiagnosticRAII cpi(Context.Diags,
1224-
PSPs.MainInputFilenameForDebugInfo);
1222+
BufferIndirectlyCausingDiagnosticRAII ricd(
1223+
Context.Diags, MSF.is<SourceFile *>()
1224+
? MSF.dyn_cast<SourceFile *>()->getFilename()
1225+
: "");
12251226

12261227
if (Stats)
12271228
countStatsPostSILGen(*Stats, *SM);

0 commit comments

Comments
 (0)