Files
swift-mirror/include/swift/AST/DefaultArgumentKind.h
Doug Gregor d32f668fb2 Introduce "inherited" default arguments and use them for inherited initializers.
Previously, we were cloning the default arguments completely, which
meant code duplication (when inheriting within a module) or simply a
failure (when inheriting across modules). Now, we reference the
default arguments where we inherited them, eliminating the
duplication. Part of <rdar://problem/16318855>.

Swift SVN r15062
2014-03-14 18:31:22 +00:00

45 lines
1.4 KiB
C++

//===--- DefaultArgumentKind.h - Default Argument Kind Enum -----*- 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 DefaultArgumentKind enumeration.
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_DEFAULTARGUMENTKIND_H
#define SWIFT_DEFAULTARGUMENTKIND_H
namespace swift {
/// Describes the kind of default argument a tuple pattern element has.
enum class DefaultArgumentKind {
/// No default argument.
None,
/// A normal default argument.
Normal,
/// The default argument is inherited from the corresponding argument of the
/// overridden declaration.
Inherited,
/// The __FILE__ default argument, which is expanded at the call site.
File,
/// The __LINE__ default argument, which is expanded at the call site.
Line,
/// The __COLUMN__ default argument, which is expanded at the call site.
Column,
/// The __FUNCTION__ default argument, which is expanded at the call site.
Function,
};
} // end namespace swift
#endif // LLVM_SWIFT_DEFAULTARGUMENTKIND_H