mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Introduce a LangOptions class to capture various type-checker-tweaking flags. For now, introduce bits to enable the constraint solver and to enable debugging of the constraint solver, and use those to eliminate the "useConstraintSolver" bit that was threaded through too much of the type checker.
Swift SVN r2836
This commit is contained in:
47
include/swift/Basic/LangOptions.h
Normal file
47
include/swift/Basic/LangOptions.h
Normal file
@@ -0,0 +1,47 @@
|
||||
//===--- LangOptions.h - Language & configuration options -------*- 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
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file defines the LangOptions class, which provides various
|
||||
// language and configuration flags.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// LangOptions.h
|
||||
// Swift
|
||||
//
|
||||
// Created by Doug Gregor on 9/12/12.
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef SWIFT_LANGOPTIONS_H
|
||||
#define SWIFT_LANGOPTIONS_H
|
||||
|
||||
namespace swift {
|
||||
/// \brief A collection of options that affect the language dialect and
|
||||
/// provide compiler debugging facilities.
|
||||
class LangOptions {
|
||||
public:
|
||||
/// \brief Whether to use the constraint solver for type checking.
|
||||
///
|
||||
/// FIXME: This option is temporary, and will be removed once the constraint
|
||||
/// solver is the only type checker.
|
||||
bool UseConstraintSolver = false;
|
||||
|
||||
/// \brief Whether we are debugging the constraint solver.
|
||||
///
|
||||
/// This option enables verbose debugging output from the constraint
|
||||
/// solver.
|
||||
bool DebugConstraintSolver = false;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user