diff options
| author | Adrian Prantl <aprantl@apple.com> | 2018-04-30 16:49:04 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2018-04-30 16:49:04 +0000 |
| commit | 05097246f352eca76207c9ebb08656c88bdf751a (patch) | |
| tree | bfc4ec8250a939aaf4ade6fc6c528726183e5367 /lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp | |
| parent | add59c052dd6768fd54431e6a3bf045e7f25cb59 (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
llvm-svn: 331197
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp')
| -rw-r--r-- | lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp index 654ac9abfcab..cbbc35f1c08a 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp @@ -38,14 +38,12 @@ using namespace lldb_renderscript; // [``slang``](https://android.googlesource.com/platform/frameworks/compile/slang), // the compiler frontend for RenderScript embeds an ARM specific triple in IR -// that is shipped in the app, after -// generating IR that has some assumptions that an ARM device is the target. -// As the IR is then compiled on a device of unknown (at time the IR was -// generated at least) architecture, -// when calling RenderScript API function as part of debugger expressions, we -// have to perform a fixup pass that -// removes those assumptions right before the module is sent to be generated by -// the llvm backend. +// that is shipped in the app, after generating IR that has some assumptions +// that an ARM device is the target. As the IR is then compiled on a device of +// unknown (at time the IR was generated at least) architecture, when calling +// RenderScript API function as part of debugger expressions, we have to +// perform a fixup pass that removes those assumptions right before the module +// is sent to be generated by the llvm backend. namespace { bool registerRSDefaultTargetOpts(clang::TargetOptions &proto, @@ -107,10 +105,9 @@ bool RenderScriptRuntimeModulePass::runOnModule(llvm::Module &module) { case llvm::Triple::ArchType::x86: changed_module |= fixupX86FunctionCalls(module); // For some reason this triple gets totally missed by the backend, and must - // be set manually. - // There a reference in bcc/Main.cpp about auto feature-detection being - // removed from LLVM3.5, but I can't - // see that discussion anywhere public. + // be set manually. There a reference in bcc/Main.cpp about auto feature- + // detection being removed from LLVM3.5, but I can't see that discussion + // anywhere public. real_triple = "i686--linux-android"; break; case llvm::Triple::ArchType::x86_64: @@ -118,12 +115,12 @@ bool RenderScriptRuntimeModulePass::runOnModule(llvm::Module &module) { break; case llvm::Triple::ArchType::mipsel: case llvm::Triple::ArchType::mips64el: - // No actual IR fixup pass is needed on MIPS, but the datalayout - // and targetmachine do need to be explicitly set. + // No actual IR fixup pass is needed on MIPS, but the datalayout and + // targetmachine do need to be explicitly set. - // bcc explicitly compiles MIPS code to use the static relocation - // model due to an issue with relocations in mclinker. - // see libbcc/support/CompilerConfig.cpp for details + // bcc explicitly compiles MIPS code to use the static relocation model due + // to an issue with relocations in mclinker. see + // libbcc/support/CompilerConfig.cpp for details reloc_model = llvm::Reloc::Static; changed_module = true; break; @@ -146,8 +143,7 @@ bool RenderScriptRuntimeModulePass::runOnModule(llvm::Module &module) { assert(target_machine && "failed to identify RenderScriptRuntime target machine"); // We've been using a triple and datalayout of some ARM variant all along, - // so - // we need to let the backend know that this is no longer the case. + // so we need to let the backend know that this is no longer the case. if (log) { log->Printf("%s - Changing RS target triple to '%s'", __FUNCTION__, real_triple.str().c_str()); |
