Files
swift-mirror/include/swift/Basic/FunctionBodySkipping.h
Alexis Laferrière 02c134372f [Sema] Add option to skip non-inlinable functions without types
This frontend flag can be used as an alternative to
-experimental-skip-non-inlinable-function-bodies that doesn’t skip
functions defining nested types. We want to keep these types as they are
used by LLDB. Other functions ares safe to skip parsing and
type-checking.

rdar://71130519
2020-11-12 14:28:09 -08:00

37 lines
1.2 KiB
C++

//===------------------- FunctionBodySkipping.h -----------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_BASIC_FUNCTIONBODYSKIPPING_H
#define SWIFT_BASIC_FUNCTIONBODYSKIPPING_H
#include "llvm/Support/DataTypes.h"
namespace swift {
/// Describes the function bodies that can be skipped in type-checking.
enum class FunctionBodySkipping : uint8_t {
/// Do not skip type-checking for any function bodies.
None,
/// Only non-inlinable function bodies should be skipped.
NonInlinable,
/// Only non-inlinable functions bodies without type definitions should
/// be skipped.
NonInlinableWithoutTypes,
/// All function bodies should be skipped, where not otherwise required
/// for type inference.
All
};
} // end namespace swift
#endif // SWIFT_BASIC_FUNCTIONBODYSKIPPING_H