summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/interface/SBError.i
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2019-04-18 16:23:33 +0000
committerPavel Labath <pavel@labath.sk>2019-04-18 16:23:33 +0000
commiteba97426d4e9319a378752b14aae2bc9bedb88b4 (patch)
treefeda936db4b819a624b41f78a97e044b2039902f /lldb/scripts/interface/SBError.i
parent16c3883b9837b0541503e03b34fd690de974e814 (diff)
downloadbcm5719-llvm-eba97426d4e9319a378752b14aae2bc9bedb88b4.tar.gz
bcm5719-llvm-eba97426d4e9319a378752b14aae2bc9bedb88b4.zip
Clean up docstrings in swig interface files
Summary: 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). Reviewers: amccarth, clayborg, jingham, aprantl Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D60498 llvm-svn: 358683
Diffstat (limited to 'lldb/scripts/interface/SBError.i')
-rw-r--r--lldb/scripts/interface/SBError.i15
1 files changed, 7 insertions, 8 deletions
diff --git a/lldb/scripts/interface/SBError.i b/lldb/scripts/interface/SBError.i
index a2df0ad99e7..d1b3dabb247 100644
--- a/lldb/scripts/interface/SBError.i
+++ b/lldb/scripts/interface/SBError.i
@@ -53,8 +53,7 @@ And (from test/python_api/event/TestEvent.py),
self.assertTrue(error.Success() and process, PROCESS_IS_VALID)
checks that after calling the target.Launch() method there's no error
-condition and we get back a void process object.
-") SBError;
+condition and we get back a void process object.") SBError;
class SBError {
public:
@@ -105,23 +104,23 @@ public:
bool
GetDescription (lldb::SBStream &description);
-
+
%pythoncode %{
__swig_getmethods__["value"] = GetError
if _newclass: value = property(GetError, None, doc='''A read only property that returns the same result as GetError().''')
-
+
__swig_getmethods__["fail"] = Fail
if _newclass: fail = property(Fail, None, doc='''A read only property that returns the same result as Fail().''')
-
+
__swig_getmethods__["success"] = Success
if _newclass: success = property(Success, None, doc='''A read only property that returns the same result as Success().''')
-
+
__swig_getmethods__["description"] = GetCString
if _newclass: description = property(GetCString, None, doc='''A read only property that returns the same result as GetCString().''')
-
+
__swig_getmethods__["type"] = GetType
if _newclass: type = property(GetType, None, doc='''A read only property that returns the same result as GetType().''')
-
+
%}
};
OpenPOWER on IntegriCloud