Reflow paragraphs in comments.
This is intended as a clean up after the big clang-format commit
(r280751), which unfortunately resulted in many of the comment
paragraphs in LLDB being very hard to read.
FYI, the script I used was:
import textwrap
import commands
import os
import sys
import re
tmp = "%s.tmp"%sys.argv[1]
out = open(tmp, "w+")
with open(sys.argv[1], "r") as f:
header = ""
text = ""
comment = re.compile(r'^( *//) ([^ ].*)$')
special = re.compile(r'^((([A-Z]+[: ])|([0-9]+ )).*)|(.*;)$')
for line in f:
match = comment.match(line)
if match and not special.match(match.group(2)):
# skip intentionally short comments.
if not text and len(match.group(2)) < 40:
out.write(line)
continue
if text:
text += " " + match.group(2)
else:
header = match.group(1)
text = match.group(2)
continue
if text:
filled = textwrap.wrap(text, width=(78-len(header)),
break_long_words=False)
for l in filled:
out.write(header+" "+l+'\n')
text = ""
out.write(line)
os.rename(tmp, sys.argv[1])
Differential Revision: https://reviews.llvm.org/D46144
llvm-svn: 331197
diff --git a/lldb/source/Target/ThreadPlanStepThrough.cpp b/lldb/source/Target/ThreadPlanStepThrough.cpp
index 46aadb0..c039a32 100644
--- a/lldb/source/Target/ThreadPlanStepThrough.cpp
+++ b/lldb/source/Target/ThreadPlanStepThrough.cpp
@@ -26,9 +26,8 @@
//----------------------------------------------------------------------
// ThreadPlanStepThrough: If the current instruction is a trampoline, step
-// through it
-// If it is the beginning of the prologue of a function, step through that as
-// well.
+// through it If it is the beginning of the prologue of a function, step
+// through that as well.
// FIXME: At present only handles DYLD trampolines.
//----------------------------------------------------------------------
@@ -49,9 +48,8 @@
m_start_address = GetThread().GetRegisterContext()->GetPC(0);
// We are going to return back to the concrete frame 1, we might pass by
- // some inlined code that we're in
- // the middle of by doing this, but it's easier than trying to figure out
- // where the inlined code might return to.
+ // some inlined code that we're in the middle of by doing this, but it's
+ // easier than trying to figure out where the inlined code might return to.
StackFrameSP return_frame_sp = m_thread.GetFrameWithStackID(m_stack_id);
@@ -136,10 +134,8 @@
bool ThreadPlanStepThrough::DoPlanExplainsStop(Event *event_ptr) {
// If we have a sub-plan, it will have been asked first if we explain the
- // stop, and
- // we won't get asked. The only time we would be the one directly asked this
- // question
- // is if we hit our backstop breakpoint.
+ // stop, and we won't get asked. The only time we would be the one directly
+ // asked this question is if we hit our backstop breakpoint.
return HitOurBackstopBreakpoint();
}
@@ -156,8 +152,7 @@
}
// If we don't have a sub-plan, then we're also done (can't see how we would
- // ever get here
- // without a plan, but just in case.
+ // ever get here without a plan, but just in case.
if (!m_sub_plan_sp) {
SetPlanComplete();
@@ -165,15 +160,13 @@
}
// If the current sub plan is not done, we don't want to stop. Actually, we
- // probably won't
- // ever get here in this state, since we generally won't get asked any
- // questions if out
- // current sub-plan is not done...
+ // probably won't ever get here in this state, since we generally won't get
+ // asked any questions if out current sub-plan is not done...
if (!m_sub_plan_sp->IsPlanComplete())
return false;
- // If our current sub plan failed, then let's just run to our backstop. If we
- // can't do that then just stop.
+ // If our current sub plan failed, then let's just run to our backstop. If
+ // we can't do that then just stop.
if (!m_sub_plan_sp->PlanSucceeded()) {
if (m_backstop_bkpt_id != LLDB_INVALID_BREAK_ID) {
m_sub_plan_sp.reset();
@@ -185,8 +178,7 @@
}
// Next see if there is a specific step through plan at our current pc (these
- // might
- // chain, for instance stepping through a dylib trampoline to the objc
+ // might chain, for instance stepping through a dylib trampoline to the objc
// dispatch function...)
LookForPlanToStepThroughFromCurrentPC();
if (m_sub_plan_sp) {