mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
38 lines
1.1 KiB
C++
38 lines
1.1 KiB
C++
//===--------------- ARCAnalysis.h - SIL ARC Analysis ----*- 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_SILANALYSIS_ARCANALYSIS_H
|
|
#define SWIFT_SILANALYSIS_ARCANALYSIS_H
|
|
|
|
namespace swift {
|
|
|
|
class SILValue;
|
|
class SILInstruction;
|
|
class AliasAnalysis;
|
|
|
|
} // end namespace swift
|
|
|
|
namespace swift {
|
|
namespace arc {
|
|
|
|
/// \returns True if the user \p User decrement the ref count of pointer \p Ptr.
|
|
bool canDecrementRefCount(SILInstruction *User, SILValue Ptr,AliasAnalysis *AA);
|
|
|
|
/// \returns True if the user \p User can use the pointer \p Ptr in a manner
|
|
/// that requires \p Ptr to be alive before Inst.
|
|
bool canUseValue(SILInstruction *User, SILValue Ptr, AliasAnalysis *AA);
|
|
|
|
} // end namespace arc
|
|
} // end namespace swift
|
|
|
|
#endif
|