mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[FrondEnd] Wrap RunInmediately() in a pretty stack trace indicating we are running user code
This commit is contained in:
@@ -1376,6 +1376,12 @@ static bool processCommandLineAndRunImmediately(CompilerInvocation &Invocation,
|
||||
ProcessCmdLine(opts.ImmediateArgv.begin(), opts.ImmediateArgv.end());
|
||||
Instance.setSILModule(std::move(SM));
|
||||
|
||||
|
||||
PrettyStackTraceStringAction trace(
|
||||
"running user code",
|
||||
MSF.is<SourceFile *>() ? MSF.get<SourceFile *>()->getFilename()
|
||||
: MSF.get<ModuleDecl *>()->getModuleFilename());
|
||||
|
||||
ReturnValue =
|
||||
RunImmediately(Instance, CmdLine, IRGenOpts, Invocation.getSILOptions());
|
||||
return Instance.getASTContext().hadError();
|
||||
|
||||
Reference in New Issue
Block a user