summaryrefslogtreecommitdiff
path: root/source/Expression/Materializer.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2018-04-30 16:49:04 +0000
committerAdrian Prantl <aprantl@apple.com>2018-04-30 16:49:04 +0000
commit0c8a6dcaa773130358536b4e7da229438577df20 (patch)
tree1d9f79f08d9cf1769190451d594370c647a8bbfd /source/Expression/Materializer.cpp
parent771b5adad1a78d65f91095e1abd214c63351b932 (diff)
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 git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@331197 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'source/Expression/Materializer.cpp')
-rw-r--r--source/Expression/Materializer.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/source/Expression/Materializer.cpp b/source/Expression/Materializer.cpp
index 39fc5c8c2..5b18bd516 100644
--- a/source/Expression/Materializer.cpp
+++ b/source/Expression/Materializer.cpp
@@ -77,7 +77,8 @@ public:
void MakeAllocation(IRMemoryMap &map, Status &err) {
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
- // Allocate a spare memory area to store the persistent variable's contents.
+ // Allocate a spare memory area to store the persistent variable's
+ // contents.
Status allocate_error;
const bool zero_memory = false;
@@ -230,8 +231,8 @@ public:
ExpressionVariable::EVIsProgramReference &&
!m_persistent_variable_sp->m_live_sp) {
// If the reference comes from the program, then the
- // ClangExpressionVariable's
- // live variable data hasn't been set up yet. Do this now.
+ // ClangExpressionVariable's live variable data hasn't been set up yet.
+ // Do this now.
lldb::addr_t location;
Status read_error;
@@ -256,10 +257,8 @@ public:
frame_bottom != LLDB_INVALID_ADDRESS && location >= frame_bottom &&
location <= frame_top) {
// If the variable is resident in the stack frame created by the
- // expression,
- // then it cannot be relied upon to stay around. We treat it as
- // needing
- // reallocation.
+ // expression, then it cannot be relied upon to stay around. We
+ // treat it as needing reallocation.
m_persistent_variable_sp->m_flags |=
ExpressionVariable::EVIsLLDBAllocated;
m_persistent_variable_sp->m_flags |=