[llvm] r173832 - Fixed a few debug messages and some 80+ violations.
Michael Gottesman
mgottesman at apple.com
Tue Jan 29 13:07:54 PST 2013
Author: mgottesman
Date: Tue Jan 29 15:07:53 2013
New Revision: 173832
URL: http://llvm.org/viewvc/llvm-project?rev=173832&view=rev
Log:
Fixed a few debug messages and some 80+ violations.
Modified:
llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
Modified: llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp?rev=173832&r1=173831&r2=173832&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp (original)
+++ llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp Tue Jan 29 15:07:53 2013
@@ -177,14 +177,14 @@ static const Value *FindSingleUseIdentif
/// argument to a call is not considered an escape.
///
static bool DoesRetainableObjPtrEscape(const User *Ptr) {
-
DEBUG(dbgs() << "DoesRetainableObjPtrEscape: Target: " << *Ptr << "\n");
// Walk the def-use chains.
SmallVector<const Value *, 4> Worklist;
Worklist.push_back(Ptr);
// If Ptr has any operands add them as well.
- for (User::const_op_iterator I = Ptr->op_begin(), E = Ptr->op_end(); I != E; ++I) {
+ for (User::const_op_iterator I = Ptr->op_begin(), E = Ptr->op_end(); I != E;
+ ++I) {
Worklist.push_back(*I);
}
@@ -210,8 +210,8 @@ static bool DoesRetainableObjPtrEscape(c
case IC_StoreStrong:
case IC_Autorelease:
case IC_AutoreleaseRV: {
- DEBUG(dbgs() << "DoesRetainableObjPtrEscape: User copies pointer arguments. "
- "Block Escapes!\n");
+ DEBUG(dbgs() << "DoesRetainableObjPtrEscape: User copies pointer "
+ "arguments. Pointer Escapes!\n");
// These special functions make copies of their pointer arguments.
return true;
}
@@ -223,11 +223,12 @@ static bool DoesRetainableObjPtrEscape(c
isa<PHINode>(UUser) || isa<SelectInst>(UUser)) {
if (!VisitedSet.insert(UUser)) {
- DEBUG(dbgs() << "DoesRetainableObjPtrEscape: User copies value. Escapes "
- "if result escapes. Adding to list.\n");
+ DEBUG(dbgs() << "DoesRetainableObjPtrEscape: User copies value. "
+ "Ptr escapes if result escapes. Adding to list.\n");
Worklist.push_back(UUser);
} else {
- DEBUG(dbgs() << "DoesRetainableObjPtrEscape: Already visited node.\n");
+ DEBUG(dbgs() << "DoesRetainableObjPtrEscape: Already visited node."
+ "\n");
}
continue;
}
@@ -244,13 +245,13 @@ static bool DoesRetainableObjPtrEscape(c
continue;
}
// Otherwise, conservatively assume an escape.
- DEBUG(dbgs() << "DoesRetainableObjPtrEscape: Assuming block escapes.\n");
+ DEBUG(dbgs() << "DoesRetainableObjPtrEscape: Assuming ptr escapes.\n");
return true;
}
} while (!Worklist.empty());
// No escapes found.
- DEBUG(dbgs() << "DoesRetainableObjPtrEscape: Block does not escape.\n");
+ DEBUG(dbgs() << "DoesRetainableObjPtrEscape: Ptr does not escape.\n");
return false;
}
More information about the llvm-commits
mailing list