Files
swift-mirror/include/swift/Basic/DiagnosticOptions.h
Jordan Rose 7cd4341cd6 Force color diagnostics when using the driver from the command line.
Previously, the frontend detected that its output was being piped into the
driver and buffered, and decided that that wasn't a color-friendly output
stream. Now, the driver passes -color-diagnostics to the frontend to force
color output if the driver itself is in a color-output context.

<rdar://problem/16697713>

Swift SVN r18506
2014-05-21 19:45:47 +00:00

39 lines
1.2 KiB
C++

//===--- DiagnosticOptions.h ------------------------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_BASIC_DIAGNOSTICOPTIONS_H
#define SWIFT_BASIC_DIAGNOSTICOPTIONS_H
namespace swift {
/// Options for controlling diagnostics.
class DiagnosticOptions {
public:
/// Indicates whether textual diagnostics should use color.
bool UseColor = false;
/// Indicates whether the diagnostics produced during compilation should be
/// checked against expected diagnostics, indicated by markers in the
/// input source file.
bool VerifyDiagnostics = false;
/// Indicates whether diagnostic passes should be skipped.
bool SkipDiagnosticPasses = false;
/// Keep emitting subsequent diagnostics after a fatal error.
bool ShowDiagnosticsAfterFatalError = false;
};
}
#endif