Skip to content

Commit

Permalink
[objc-arc] Added an option to arc-annotations for turning off CheckFo…
Browse files Browse the repository at this point in the history
…rCFGHazard.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179717 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
gottesmm committed Apr 17, 2013
1 parent 8c49338 commit ba5d950
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Transforms/ObjCARC/ObjCARCOpts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit ba5d950

Please sign in to comment.