Files
swift-mirror/lib/SILOptimizer/Mandatory/MoveOnlyUtils.h
Michael Gottesman 37d60a08bb [move-only] Rename mark_must_check -> mark_unresolved_non_copyable_value.
I was originally hoping to reuse mark_must_check for multiple types of checkers.
In practice, this is not what happened... so giving it a name specifically to do
with non copyable types makes more sense and makes the code clearer.

Just a pure rename.
2023-08-30 22:29:30 -07:00

49 lines
1.4 KiB
C++

//===--- MoveOnlyUtils.h --------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 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_SILOPTIMIZER_MANDATORY_MOVEONLYUTILS_H
#define SWIFT_SILOPTIMIZER_MANDATORY_MOVEONLYUTILS_H
namespace swift {
class SILFunction;
class MarkUnresolvedNonCopyableValueInst;
class Operand;
namespace siloptimizer {
class DiagnosticEmitter;
bool cleanupNonCopyableCopiesAfterEmittingDiagnostic(SILFunction *fn);
/// Emit an error if we missed any copies when running markers. To check if a
/// diagnostic was emitted, use \p diagnosticEmitter.getDiagnosticCount().
void emitCheckerMissedCopyOfNonCopyableTypeErrors(
SILFunction *fn, DiagnosticEmitter &diagnosticEmitter);
bool eliminateTemporaryAllocationsFromLet(
MarkUnresolvedNonCopyableValueInst *markedInst);
namespace noncopyable {
bool memInstMustConsume(Operand *memOper);
bool memInstMustReinitialize(Operand *memOper);
bool memInstMustInitialize(Operand *memOper);
} // namespace noncopyable
} // namespace siloptimizer
} // namespace swift
#endif