[Lldb-commits] [PATCH] D60498: Clean up docstrings in swig interface files
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 10 01:26:25 PDT 2019
labath created this revision.
labath added reviewers: amccarth, clayborg, jingham, aprantl.
This patch removes the "//----" frames and "///" leading lines from
docstring comments. We already have code doing transformations like this in
modify-python-lldb.py, but that's a script I'd like to remove. Instead
of running these transformations everytime we run swig, we can just
perform equivalent on its input once.
This patch can be reproduced (e.g. for downstream merges) with the
following "sweet" perl command:
perl -i -p -e 'BEGIN{ $/ = undef;} s:(" *\n) *//-----*\n:\1:gs; s:^( *)/// ?:\1:gsm; s:^ *//------*\n( *\n)?( *"):\2:gsm; s: *$::gsm; s:\n *"\):"):gsm' scripts/interface/*.i
This command produces nearly equivalent python files to those produced
by the relevant code in modify-python-lldb.py. The only difference I
noticed is that here I am slightly more agressive in removing trailing
newlines from docstring comments (the python script seems to leave
newlines in class-level docstrings).
https://reviews.llvm.org/D60498
Files:
scripts/interface/SBAddress.i
scripts/interface/SBBlock.i
scripts/interface/SBBreakpoint.i
scripts/interface/SBBreakpointLocation.i
scripts/interface/SBBreakpointName.i
scripts/interface/SBBroadcaster.i
scripts/interface/SBCommandInterpreter.i
scripts/interface/SBCommandReturnObject.i
scripts/interface/SBCompileUnit.i
scripts/interface/SBData.i
scripts/interface/SBDebugger.i
scripts/interface/SBDeclaration.i
scripts/interface/SBError.i
scripts/interface/SBEvent.i
scripts/interface/SBExecutionContext.i
scripts/interface/SBExpressionOptions.i
scripts/interface/SBFileSpec.i
scripts/interface/SBFileSpecList.i
scripts/interface/SBFrame.i
scripts/interface/SBFunction.i
scripts/interface/SBHostOS.i
scripts/interface/SBInstruction.i
scripts/interface/SBInstructionList.i
scripts/interface/SBLanguageRuntime.i
scripts/interface/SBLaunchInfo.i
scripts/interface/SBLineEntry.i
scripts/interface/SBListener.i
scripts/interface/SBModule.i
scripts/interface/SBModuleSpec.i
scripts/interface/SBPlatform.i
scripts/interface/SBProcess.i
scripts/interface/SBQueue.i
scripts/interface/SBQueueItem.i
scripts/interface/SBSection.i
scripts/interface/SBSourceManager.i
scripts/interface/SBStream.i
scripts/interface/SBStringList.i
scripts/interface/SBSymbol.i
scripts/interface/SBSymbolContext.i
scripts/interface/SBSymbolContextList.i
scripts/interface/SBTarget.i
scripts/interface/SBThread.i
scripts/interface/SBThreadCollection.i
scripts/interface/SBThreadPlan.i
scripts/interface/SBType.i
scripts/interface/SBTypeCategory.i
scripts/interface/SBTypeFilter.i
scripts/interface/SBTypeFormat.i
scripts/interface/SBTypeNameSpecifier.i
scripts/interface/SBTypeSummary.i
scripts/interface/SBTypeSynthetic.i
scripts/interface/SBValue.i
scripts/interface/SBValueList.i
scripts/interface/SBVariablesOptions.i
scripts/interface/SBWatchpoint.i
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60498.194459.patch
Type: text/x-patch
Size: 226550 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190410/5d95796c/attachment-0001.bin>
More information about the lldb-commits
mailing list