mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-24 12:29:33 +00:00
[objc-arc] Convert the bodies of ARCInstKind predicates into covered switches.
This is much better than the previous manner of just using short-curcuiting booleans from: 1. A "naive" efficiency perspective: we do not have to rely on the compiler to change the short circuiting boolean operations into a switch. 2. An understanding perspective by making the implicit behavior of negative predicates explicit. 3. A maintainability perspective through the covered switch flag making it easy to know where to update code when adding new ARCInstKinds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229906 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b2f47bdbc2
commit
921fa44c44
@ -291,3 +291,317 @@ ARCInstKind llvm::objcarc::GetARCInstKind(const Value *V) {
|
|||||||
// Otherwise, it's totally inert for ARC purposes.
|
// Otherwise, it's totally inert for ARC purposes.
|
||||||
return ARCInstKind::None;
|
return ARCInstKind::None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// \brief Test if the given class is a kind of user.
|
||||||
|
bool llvm::objcarc::IsUser(ARCInstKind Class) {
|
||||||
|
switch (Class) {
|
||||||
|
case ARCInstKind::User:
|
||||||
|
case ARCInstKind::CallOrUser:
|
||||||
|
case ARCInstKind::IntrinsicUser:
|
||||||
|
return true;
|
||||||
|
case ARCInstKind::Retain:
|
||||||
|
case ARCInstKind::RetainRV:
|
||||||
|
case ARCInstKind::RetainBlock:
|
||||||
|
case ARCInstKind::Release:
|
||||||
|
case ARCInstKind::Autorelease:
|
||||||
|
case ARCInstKind::AutoreleaseRV:
|
||||||
|
case ARCInstKind::AutoreleasepoolPush:
|
||||||
|
case ARCInstKind::AutoreleasepoolPop:
|
||||||
|
case ARCInstKind::NoopCast:
|
||||||
|
case ARCInstKind::FusedRetainAutorelease:
|
||||||
|
case ARCInstKind::FusedRetainAutoreleaseRV:
|
||||||
|
case ARCInstKind::LoadWeakRetained:
|
||||||
|
case ARCInstKind::StoreWeak:
|
||||||
|
case ARCInstKind::InitWeak:
|
||||||
|
case ARCInstKind::LoadWeak:
|
||||||
|
case ARCInstKind::MoveWeak:
|
||||||
|
case ARCInstKind::CopyWeak:
|
||||||
|
case ARCInstKind::DestroyWeak:
|
||||||
|
case ARCInstKind::StoreStrong:
|
||||||
|
case ARCInstKind::Call:
|
||||||
|
case ARCInstKind::None:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
llvm_unreachable("covered switch isn't covered?");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// \brief Test if the given class is objc_retain or equivalent.
|
||||||
|
bool llvm::objcarc::IsRetain(ARCInstKind Class) {
|
||||||
|
switch (Class) {
|
||||||
|
case ARCInstKind::Retain:
|
||||||
|
case ARCInstKind::RetainRV:
|
||||||
|
return true;
|
||||||
|
// I believe we treat retain block as not a retain since it can copy its
|
||||||
|
// block.
|
||||||
|
case ARCInstKind::RetainBlock:
|
||||||
|
case ARCInstKind::Release:
|
||||||
|
case ARCInstKind::Autorelease:
|
||||||
|
case ARCInstKind::AutoreleaseRV:
|
||||||
|
case ARCInstKind::AutoreleasepoolPush:
|
||||||
|
case ARCInstKind::AutoreleasepoolPop:
|
||||||
|
case ARCInstKind::NoopCast:
|
||||||
|
case ARCInstKind::FusedRetainAutorelease:
|
||||||
|
case ARCInstKind::FusedRetainAutoreleaseRV:
|
||||||
|
case ARCInstKind::LoadWeakRetained:
|
||||||
|
case ARCInstKind::StoreWeak:
|
||||||
|
case ARCInstKind::InitWeak:
|
||||||
|
case ARCInstKind::LoadWeak:
|
||||||
|
case ARCInstKind::MoveWeak:
|
||||||
|
case ARCInstKind::CopyWeak:
|
||||||
|
case ARCInstKind::DestroyWeak:
|
||||||
|
case ARCInstKind::StoreStrong:
|
||||||
|
case ARCInstKind::IntrinsicUser:
|
||||||
|
case ARCInstKind::CallOrUser:
|
||||||
|
case ARCInstKind::Call:
|
||||||
|
case ARCInstKind::User:
|
||||||
|
case ARCInstKind::None:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
llvm_unreachable("covered switch isn't covered?");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// \brief Test if the given class is objc_autorelease or equivalent.
|
||||||
|
bool llvm::objcarc::IsAutorelease(ARCInstKind Class) {
|
||||||
|
switch (Class) {
|
||||||
|
case ARCInstKind::Autorelease:
|
||||||
|
case ARCInstKind::AutoreleaseRV:
|
||||||
|
return true;
|
||||||
|
case ARCInstKind::Retain:
|
||||||
|
case ARCInstKind::RetainRV:
|
||||||
|
case ARCInstKind::RetainBlock:
|
||||||
|
case ARCInstKind::Release:
|
||||||
|
case ARCInstKind::AutoreleasepoolPush:
|
||||||
|
case ARCInstKind::AutoreleasepoolPop:
|
||||||
|
case ARCInstKind::NoopCast:
|
||||||
|
case ARCInstKind::FusedRetainAutorelease:
|
||||||
|
case ARCInstKind::FusedRetainAutoreleaseRV:
|
||||||
|
case ARCInstKind::LoadWeakRetained:
|
||||||
|
case ARCInstKind::StoreWeak:
|
||||||
|
case ARCInstKind::InitWeak:
|
||||||
|
case ARCInstKind::LoadWeak:
|
||||||
|
case ARCInstKind::MoveWeak:
|
||||||
|
case ARCInstKind::CopyWeak:
|
||||||
|
case ARCInstKind::DestroyWeak:
|
||||||
|
case ARCInstKind::StoreStrong:
|
||||||
|
case ARCInstKind::IntrinsicUser:
|
||||||
|
case ARCInstKind::CallOrUser:
|
||||||
|
case ARCInstKind::Call:
|
||||||
|
case ARCInstKind::User:
|
||||||
|
case ARCInstKind::None:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
llvm_unreachable("covered switch isn't covered?");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// \brief Test if the given class represents instructions which return their
|
||||||
|
/// argument verbatim.
|
||||||
|
bool llvm::objcarc::IsForwarding(ARCInstKind Class) {
|
||||||
|
switch (Class) {
|
||||||
|
case ARCInstKind::Retain:
|
||||||
|
case ARCInstKind::RetainRV:
|
||||||
|
case ARCInstKind::Autorelease:
|
||||||
|
case ARCInstKind::AutoreleaseRV:
|
||||||
|
case ARCInstKind::NoopCast:
|
||||||
|
return true;
|
||||||
|
case ARCInstKind::RetainBlock:
|
||||||
|
case ARCInstKind::Release:
|
||||||
|
case ARCInstKind::AutoreleasepoolPush:
|
||||||
|
case ARCInstKind::AutoreleasepoolPop:
|
||||||
|
case ARCInstKind::FusedRetainAutorelease:
|
||||||
|
case ARCInstKind::FusedRetainAutoreleaseRV:
|
||||||
|
case ARCInstKind::LoadWeakRetained:
|
||||||
|
case ARCInstKind::StoreWeak:
|
||||||
|
case ARCInstKind::InitWeak:
|
||||||
|
case ARCInstKind::LoadWeak:
|
||||||
|
case ARCInstKind::MoveWeak:
|
||||||
|
case ARCInstKind::CopyWeak:
|
||||||
|
case ARCInstKind::DestroyWeak:
|
||||||
|
case ARCInstKind::StoreStrong:
|
||||||
|
case ARCInstKind::IntrinsicUser:
|
||||||
|
case ARCInstKind::CallOrUser:
|
||||||
|
case ARCInstKind::Call:
|
||||||
|
case ARCInstKind::User:
|
||||||
|
case ARCInstKind::None:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
llvm_unreachable("covered switch isn't covered?");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// \brief Test if the given class represents instructions which do nothing if
|
||||||
|
/// passed a null pointer.
|
||||||
|
bool llvm::objcarc::IsNoopOnNull(ARCInstKind Class) {
|
||||||
|
switch (Class) {
|
||||||
|
case ARCInstKind::Retain:
|
||||||
|
case ARCInstKind::RetainRV:
|
||||||
|
case ARCInstKind::Release:
|
||||||
|
case ARCInstKind::Autorelease:
|
||||||
|
case ARCInstKind::AutoreleaseRV:
|
||||||
|
case ARCInstKind::RetainBlock:
|
||||||
|
return true;
|
||||||
|
case ARCInstKind::AutoreleasepoolPush:
|
||||||
|
case ARCInstKind::AutoreleasepoolPop:
|
||||||
|
case ARCInstKind::FusedRetainAutorelease:
|
||||||
|
case ARCInstKind::FusedRetainAutoreleaseRV:
|
||||||
|
case ARCInstKind::LoadWeakRetained:
|
||||||
|
case ARCInstKind::StoreWeak:
|
||||||
|
case ARCInstKind::InitWeak:
|
||||||
|
case ARCInstKind::LoadWeak:
|
||||||
|
case ARCInstKind::MoveWeak:
|
||||||
|
case ARCInstKind::CopyWeak:
|
||||||
|
case ARCInstKind::DestroyWeak:
|
||||||
|
case ARCInstKind::StoreStrong:
|
||||||
|
case ARCInstKind::IntrinsicUser:
|
||||||
|
case ARCInstKind::CallOrUser:
|
||||||
|
case ARCInstKind::Call:
|
||||||
|
case ARCInstKind::User:
|
||||||
|
case ARCInstKind::None:
|
||||||
|
case ARCInstKind::NoopCast:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
llvm_unreachable("covered switch isn't covered?");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// \brief Test if the given class represents instructions which are always safe
|
||||||
|
/// to mark with the "tail" keyword.
|
||||||
|
bool llvm::objcarc::IsAlwaysTail(ARCInstKind Class) {
|
||||||
|
// ARCInstKind::RetainBlock may be given a stack argument.
|
||||||
|
switch (Class) {
|
||||||
|
case ARCInstKind::Retain:
|
||||||
|
case ARCInstKind::RetainRV:
|
||||||
|
case ARCInstKind::AutoreleaseRV:
|
||||||
|
return true;
|
||||||
|
case ARCInstKind::Release:
|
||||||
|
case ARCInstKind::Autorelease:
|
||||||
|
case ARCInstKind::RetainBlock:
|
||||||
|
case ARCInstKind::AutoreleasepoolPush:
|
||||||
|
case ARCInstKind::AutoreleasepoolPop:
|
||||||
|
case ARCInstKind::FusedRetainAutorelease:
|
||||||
|
case ARCInstKind::FusedRetainAutoreleaseRV:
|
||||||
|
case ARCInstKind::LoadWeakRetained:
|
||||||
|
case ARCInstKind::StoreWeak:
|
||||||
|
case ARCInstKind::InitWeak:
|
||||||
|
case ARCInstKind::LoadWeak:
|
||||||
|
case ARCInstKind::MoveWeak:
|
||||||
|
case ARCInstKind::CopyWeak:
|
||||||
|
case ARCInstKind::DestroyWeak:
|
||||||
|
case ARCInstKind::StoreStrong:
|
||||||
|
case ARCInstKind::IntrinsicUser:
|
||||||
|
case ARCInstKind::CallOrUser:
|
||||||
|
case ARCInstKind::Call:
|
||||||
|
case ARCInstKind::User:
|
||||||
|
case ARCInstKind::None:
|
||||||
|
case ARCInstKind::NoopCast:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
llvm_unreachable("covered switch isn't covered?");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// \brief Test if the given class represents instructions which are never safe
|
||||||
|
/// to mark with the "tail" keyword.
|
||||||
|
bool llvm::objcarc::IsNeverTail(ARCInstKind Class) {
|
||||||
|
/// It is never safe to tail call objc_autorelease since by tail calling
|
||||||
|
/// objc_autorelease: fast autoreleasing causing our object to be potentially
|
||||||
|
/// reclaimed from the autorelease pool which violates the semantics of
|
||||||
|
/// __autoreleasing types in ARC.
|
||||||
|
switch (Class) {
|
||||||
|
case ARCInstKind::Autorelease:
|
||||||
|
return true;
|
||||||
|
case ARCInstKind::Retain:
|
||||||
|
case ARCInstKind::RetainRV:
|
||||||
|
case ARCInstKind::AutoreleaseRV:
|
||||||
|
case ARCInstKind::Release:
|
||||||
|
case ARCInstKind::RetainBlock:
|
||||||
|
case ARCInstKind::AutoreleasepoolPush:
|
||||||
|
case ARCInstKind::AutoreleasepoolPop:
|
||||||
|
case ARCInstKind::FusedRetainAutorelease:
|
||||||
|
case ARCInstKind::FusedRetainAutoreleaseRV:
|
||||||
|
case ARCInstKind::LoadWeakRetained:
|
||||||
|
case ARCInstKind::StoreWeak:
|
||||||
|
case ARCInstKind::InitWeak:
|
||||||
|
case ARCInstKind::LoadWeak:
|
||||||
|
case ARCInstKind::MoveWeak:
|
||||||
|
case ARCInstKind::CopyWeak:
|
||||||
|
case ARCInstKind::DestroyWeak:
|
||||||
|
case ARCInstKind::StoreStrong:
|
||||||
|
case ARCInstKind::IntrinsicUser:
|
||||||
|
case ARCInstKind::CallOrUser:
|
||||||
|
case ARCInstKind::Call:
|
||||||
|
case ARCInstKind::User:
|
||||||
|
case ARCInstKind::None:
|
||||||
|
case ARCInstKind::NoopCast:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
llvm_unreachable("covered switch isn't covered?");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// \brief Test if the given class represents instructions which are always safe
|
||||||
|
/// to mark with the nounwind attribute.
|
||||||
|
bool llvm::objcarc::IsNoThrow(ARCInstKind Class) {
|
||||||
|
// objc_retainBlock is not nounwind because it calls user copy constructors
|
||||||
|
// which could theoretically throw.
|
||||||
|
switch (Class) {
|
||||||
|
case ARCInstKind::Retain:
|
||||||
|
case ARCInstKind::RetainRV:
|
||||||
|
case ARCInstKind::Release:
|
||||||
|
case ARCInstKind::Autorelease:
|
||||||
|
case ARCInstKind::AutoreleaseRV:
|
||||||
|
case ARCInstKind::AutoreleasepoolPush:
|
||||||
|
case ARCInstKind::AutoreleasepoolPop:
|
||||||
|
return true;
|
||||||
|
case ARCInstKind::RetainBlock:
|
||||||
|
case ARCInstKind::FusedRetainAutorelease:
|
||||||
|
case ARCInstKind::FusedRetainAutoreleaseRV:
|
||||||
|
case ARCInstKind::LoadWeakRetained:
|
||||||
|
case ARCInstKind::StoreWeak:
|
||||||
|
case ARCInstKind::InitWeak:
|
||||||
|
case ARCInstKind::LoadWeak:
|
||||||
|
case ARCInstKind::MoveWeak:
|
||||||
|
case ARCInstKind::CopyWeak:
|
||||||
|
case ARCInstKind::DestroyWeak:
|
||||||
|
case ARCInstKind::StoreStrong:
|
||||||
|
case ARCInstKind::IntrinsicUser:
|
||||||
|
case ARCInstKind::CallOrUser:
|
||||||
|
case ARCInstKind::Call:
|
||||||
|
case ARCInstKind::User:
|
||||||
|
case ARCInstKind::None:
|
||||||
|
case ARCInstKind::NoopCast:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
llvm_unreachable("covered switch isn't covered?");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Test whether the given instruction can autorelease any pointer or cause an
|
||||||
|
/// autoreleasepool pop.
|
||||||
|
///
|
||||||
|
/// This means that it *could* interrupt the RV optimization.
|
||||||
|
bool llvm::objcarc::CanInterruptRV(ARCInstKind Class) {
|
||||||
|
switch (Class) {
|
||||||
|
case ARCInstKind::AutoreleasepoolPop:
|
||||||
|
case ARCInstKind::CallOrUser:
|
||||||
|
case ARCInstKind::Call:
|
||||||
|
case ARCInstKind::Autorelease:
|
||||||
|
case ARCInstKind::AutoreleaseRV:
|
||||||
|
case ARCInstKind::FusedRetainAutorelease:
|
||||||
|
case ARCInstKind::FusedRetainAutoreleaseRV:
|
||||||
|
return true;
|
||||||
|
case ARCInstKind::Retain:
|
||||||
|
case ARCInstKind::RetainRV:
|
||||||
|
case ARCInstKind::Release:
|
||||||
|
case ARCInstKind::AutoreleasepoolPush:
|
||||||
|
case ARCInstKind::RetainBlock:
|
||||||
|
case ARCInstKind::LoadWeakRetained:
|
||||||
|
case ARCInstKind::StoreWeak:
|
||||||
|
case ARCInstKind::InitWeak:
|
||||||
|
case ARCInstKind::LoadWeak:
|
||||||
|
case ARCInstKind::MoveWeak:
|
||||||
|
case ARCInstKind::CopyWeak:
|
||||||
|
case ARCInstKind::DestroyWeak:
|
||||||
|
case ARCInstKind::StoreStrong:
|
||||||
|
case ARCInstKind::IntrinsicUser:
|
||||||
|
case ARCInstKind::User:
|
||||||
|
case ARCInstKind::None:
|
||||||
|
case ARCInstKind::NoopCast:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
llvm_unreachable("covered switch isn't covered?");
|
||||||
|
}
|
||||||
|
@ -57,86 +57,37 @@ enum class ARCInstKind {
|
|||||||
raw_ostream &operator<<(raw_ostream &OS, const ARCInstKind Class);
|
raw_ostream &operator<<(raw_ostream &OS, const ARCInstKind Class);
|
||||||
|
|
||||||
/// \brief Test if the given class is a kind of user.
|
/// \brief Test if the given class is a kind of user.
|
||||||
inline static bool IsUser(ARCInstKind Class) {
|
bool IsUser(ARCInstKind Class);
|
||||||
return Class == ARCInstKind::User || Class == ARCInstKind::CallOrUser ||
|
|
||||||
Class == ARCInstKind::IntrinsicUser;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \brief Test if the given class is objc_retain or equivalent.
|
/// \brief Test if the given class is objc_retain or equivalent.
|
||||||
static inline bool IsRetain(ARCInstKind Class) {
|
bool IsRetain(ARCInstKind Class);
|
||||||
return Class == ARCInstKind::Retain || Class == ARCInstKind::RetainRV;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \brief Test if the given class is objc_autorelease or equivalent.
|
/// \brief Test if the given class is objc_autorelease or equivalent.
|
||||||
static inline bool IsAutorelease(ARCInstKind Class) {
|
bool IsAutorelease(ARCInstKind Class);
|
||||||
return Class == ARCInstKind::Autorelease ||
|
|
||||||
Class == ARCInstKind::AutoreleaseRV;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \brief Test if the given class represents instructions which return their
|
/// \brief Test if the given class represents instructions which return their
|
||||||
/// argument verbatim.
|
/// argument verbatim.
|
||||||
static inline bool IsForwarding(ARCInstKind Class) {
|
bool IsForwarding(ARCInstKind Class);
|
||||||
return Class == ARCInstKind::Retain || Class == ARCInstKind::RetainRV ||
|
|
||||||
Class == ARCInstKind::Autorelease ||
|
|
||||||
Class == ARCInstKind::AutoreleaseRV || Class == ARCInstKind::NoopCast;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \brief Test if the given class represents instructions which do nothing if
|
/// \brief Test if the given class represents instructions which do nothing if
|
||||||
/// passed a null pointer.
|
/// passed a null pointer.
|
||||||
static inline bool IsNoopOnNull(ARCInstKind Class) {
|
bool IsNoopOnNull(ARCInstKind Class);
|
||||||
return Class == ARCInstKind::Retain || Class == ARCInstKind::RetainRV ||
|
|
||||||
Class == ARCInstKind::Release || Class == ARCInstKind::Autorelease ||
|
|
||||||
Class == ARCInstKind::AutoreleaseRV ||
|
|
||||||
Class == ARCInstKind::RetainBlock;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \brief Test if the given class represents instructions which are always safe
|
/// \brief Test if the given class represents instructions which are always safe
|
||||||
/// to mark with the "tail" keyword.
|
/// to mark with the "tail" keyword.
|
||||||
static inline bool IsAlwaysTail(ARCInstKind Class) {
|
bool IsAlwaysTail(ARCInstKind Class);
|
||||||
// ARCInstKind::RetainBlock may be given a stack argument.
|
|
||||||
return Class == ARCInstKind::Retain || Class == ARCInstKind::RetainRV ||
|
|
||||||
Class == ARCInstKind::AutoreleaseRV;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \brief Test if the given class represents instructions which are never safe
|
/// \brief Test if the given class represents instructions which are never safe
|
||||||
/// to mark with the "tail" keyword.
|
/// to mark with the "tail" keyword.
|
||||||
static inline bool IsNeverTail(ARCInstKind Class) {
|
bool IsNeverTail(ARCInstKind Class);
|
||||||
/// It is never safe to tail call objc_autorelease since by tail calling
|
|
||||||
/// objc_autorelease, we also tail call -[NSObject autorelease] which supports
|
|
||||||
/// fast autoreleasing causing our object to be potentially reclaimed from the
|
|
||||||
/// autorelease pool which violates the semantics of __autoreleasing types in
|
|
||||||
/// ARC.
|
|
||||||
return Class == ARCInstKind::Autorelease;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \brief Test if the given class represents instructions which are always safe
|
/// \brief Test if the given class represents instructions which are always safe
|
||||||
/// to mark with the nounwind attribute.
|
/// to mark with the nounwind attribute.
|
||||||
static inline bool IsNoThrow(ARCInstKind Class) {
|
bool IsNoThrow(ARCInstKind Class);
|
||||||
// objc_retainBlock is not nounwind because it calls user copy constructors
|
|
||||||
// which could theoretically throw.
|
|
||||||
return Class == ARCInstKind::Retain || Class == ARCInstKind::RetainRV ||
|
|
||||||
Class == ARCInstKind::Release || Class == ARCInstKind::Autorelease ||
|
|
||||||
Class == ARCInstKind::AutoreleaseRV ||
|
|
||||||
Class == ARCInstKind::AutoreleasepoolPush ||
|
|
||||||
Class == ARCInstKind::AutoreleasepoolPop;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Test whether the given instruction can autorelease any pointer or cause an
|
/// Test whether the given instruction can autorelease any pointer or cause an
|
||||||
/// autoreleasepool pop.
|
/// autoreleasepool pop.
|
||||||
static inline bool CanInterruptRV(ARCInstKind Class) {
|
bool CanInterruptRV(ARCInstKind Class);
|
||||||
switch (Class) {
|
|
||||||
case ARCInstKind::AutoreleasepoolPop:
|
|
||||||
case ARCInstKind::CallOrUser:
|
|
||||||
case ARCInstKind::Call:
|
|
||||||
case ARCInstKind::Autorelease:
|
|
||||||
case ARCInstKind::AutoreleaseRV:
|
|
||||||
case ARCInstKind::FusedRetainAutorelease:
|
|
||||||
case ARCInstKind::FusedRetainAutoreleaseRV:
|
|
||||||
return true;
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \brief Determine if F is one of the special known Functions. If it isn't,
|
/// \brief Determine if F is one of the special known Functions. If it isn't,
|
||||||
/// return ARCInstKind::CallOrUser.
|
/// return ARCInstKind::CallOrUser.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user