From b9c1b51e45b845debb76d8658edabca70ca56079 Mon Sep 17 00:00:00 2001 From: Kate Stone Date: Tue, 6 Sep 2016 20:57:50 +0000 Subject: *** This commit represents a complete reformatting of the LLDB source code *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751 --- .../module_section/TestModuleAndSection.py | 28 +++++++++++++++------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'lldb/packages/Python/lldbsuite/test/python_api/module_section') diff --git a/lldb/packages/Python/lldbsuite/test/python_api/module_section/TestModuleAndSection.py b/lldb/packages/Python/lldbsuite/test/python_api/module_section/TestModuleAndSection.py index 859edd80ee8..79b988465d7 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/module_section/TestModuleAndSection.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/module_section/TestModuleAndSection.py @@ -5,8 +5,8 @@ Test some SBModule and SBSection APIs. from __future__ import print_function - -import os, time +import os +import time import re import lldb from lldbsuite.test.decorators import * @@ -14,12 +14,14 @@ from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil from lldbsuite.test.lldbutil import symbol_type_to_str + class ModuleAndSectionAPIsTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - # Py3 asserts due to a bug in SWIG. A fix for this was upstreamed into SWIG 3.0.8. - @skipIf(py_version=['>=', (3,0)], swig_version=['<', (3,0,8)]) + # Py3 asserts due to a bug in SWIG. A fix for this was upstreamed into + # SWIG 3.0.8. + @skipIf(py_version=['>=', (3, 0)], swig_version=['<', (3, 0, 8)]) @add_test_categories(['pyapi']) def test_module_and_section(self): """Test module and section APIs.""" @@ -47,18 +49,29 @@ class ModuleAndSectionAPIsTestCase(TestBase): INDENT2 = INDENT * 2 for sec in exe_module.section_iter(): print(sec) - print(INDENT + "Number of subsections: %d" % sec.GetNumSubSections()) + print( + INDENT + + "Number of subsections: %d" % + sec.GetNumSubSections()) if sec.GetNumSubSections() == 0: for sym in exe_module.symbol_in_section_iter(sec): print(INDENT + str(sym)) - print(INDENT + "symbol type: %s" % symbol_type_to_str(sym.GetType())) + print( + INDENT + + "symbol type: %s" % + symbol_type_to_str( + sym.GetType())) else: for subsec in sec: print(INDENT + str(subsec)) # Now print the symbols belonging to the subsection.... for sym in exe_module.symbol_in_section_iter(subsec): print(INDENT2 + str(sym)) - print(INDENT2 + "symbol type: %s" % symbol_type_to_str(sym.GetType())) + print( + INDENT2 + + "symbol type: %s" % + symbol_type_to_str( + sym.GetType())) @add_test_categories(['pyapi']) def test_module_and_section_boundary_condition(self): @@ -128,4 +141,3 @@ class ModuleAndSectionAPIsTestCase(TestBase): INDENT2 = INDENT * 2 for cu in exe_module.compile_unit_iter(): print(cu) - -- cgit v1.2.3