aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Gottesman <mgottesman@apple.com>2013-04-17 20:48:01 +0000
committerMichael Gottesman <mgottesman@apple.com>2013-04-17 20:48:01 +0000
commitba5d950518b13353028ea958714fbadca032e1a3 (patch)
tree3727d312e3827d5f39c44b4d070a2f493fcc568e /lib
parent8c493386ce0fb04bfa450e371c7b7e23de6d177c (diff)
[objc-arc] Added an option to arc-annotations for turning off CheckForCFGHazard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179717 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/ObjCARC/ObjCARCOpts.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Transforms/ObjCARC/ObjCARCOpts.cpp b/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
index cddf00bea7..bf1c93dc8d 100644
--- a/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
+++ b/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
@@ -710,6 +710,9 @@ void BBState::MergeSucc(const BBState &Other) {
/// Enable/disable ARC sequence annotations.
static cl::opt<bool>
EnableARCAnnotations("enable-objc-arc-annotations", cl::init(false));
+static cl::opt<bool>
+EnableCheckForCFGHazards("enable-objc-arc-checkforcfghazards",
+ cl::init(true));
/// This function appends a unique ARCAnnotationProvenanceSourceMDKind id to an
/// instruction so that we can track backwards when post processing via the llvm
@@ -2170,6 +2173,9 @@ ObjCARCOpt::VisitTopDown(BasicBlock *BB,
// bottom of the basic block.
ANNOTATE_TOPDOWN_BBEND(MyStates, BB);
+#ifdef ARC_ANNOTATIONS
+ if (EnableARCAnnotations && EnableCheckForCFGHazards)
+#endif
CheckForCFGHazards(BB, BBStates, MyStates);
return NestingDetected;
}