mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ABI/API checker: use colors when emitting diagnostics in module loading
This commit is contained in:
@@ -2079,7 +2079,9 @@ swift::ide::api::getSDKNodeRoot(SDKContext &SDKCtx,
|
||||
|
||||
CompilerInstance &CI = SDKCtx.newCompilerInstance();
|
||||
// Display diagnostics to stderr.
|
||||
PrintingDiagnosticConsumer PrintDiags;
|
||||
PrintingDiagnosticConsumer PrintDiags(llvm::errs());
|
||||
if (llvm::errs().has_colors())
|
||||
PrintDiags.forceColors();
|
||||
CI.addDiagnosticConsumer(&PrintDiags);
|
||||
if (CI.setup(Invocation)) {
|
||||
llvm::errs() << "Failed to setup the compiler instance\n";
|
||||
|
||||
Reference in New Issue
Block a user