Skip to content

Instantly share code, notes, and snippets.

View modocache's full-sized avatar

Brian Gesiak modocache

View GitHub Profile
diff --git a/utils/lit/tests/lit.cfg b/utils/lit/tests/lit.cfg
index 0c98299285a..7473bb72585 100644
--- a/utils/lit/tests/lit.cfg
+++ b/utils/lit/tests/lit.cfg
@@ -69,3 +69,4 @@ llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)
if llvm_tools_dir != None:
path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH']))
config.environment['PATH'] = path
+ lit_config.note('Adding llvm_tools_dir to PATH: {}'.format(path))
$ ~/local/Source/fb/llvm/build/bin/llvm-lit -v --path ~/local/Source/fb/llvm/build/bin ~/local/Source/fb/llvm/llvm/utils/lit/tests
llvm-lit: /Users/bgesiak/Source/fb/llvm/llvm/utils/lit/tests/lit.cfg:53: warning: Could not import psutil. Some tests will be skipped and the --timeout command line argument will not work.
-- Testing: 21 tests, 8 threads --
UNSUPPORTED: lit :: googletest-timeout.py (1 of 21)
PASS: lit :: shell-parsing.py (2 of 21)
PASS: lit :: boolean-parsing.py (3 of 21)
PASS: lit :: shtest-encoding.py (4 of 21)
PASS: lit :: progress-bar.py (5 of 21)
PASS: lit :: googletest-format.py (6 of 21)
UNSUPPORTED: lit :: shtest-timeout.py (7 of 21)
C:\Users\modocache\Source\fb\llvm\llvm> python utils\lit\lit.py --path C:\Users\modocache\Source\fb\llvm\build\Debug\bin utils\lit\tests\shtest-timeout.py
lit.py: C:\Users\modocache\Source\fb\llvm\llvm\utils\lit\tests\lit.cfg:50: note: Found python psutil module
-- Testing: 1 tests, 1 threads --
FAIL: lit :: shtest-timeout.py (1 of 1)
Testing Time: 3.75s
********************
Failing Tests (1):
lit :: shtest-timeout.py
Unexpected Failures: 1
C:\Users\modocache\Source\fb\llvm\llvm>python utils\lit\lit.py -v --path C:\Users\modocache\Source\fb\llvm\build\Debug\bin utils\lit\tests\shtest-format.py
lit.py: C:\Users\modocache\Source\fb\llvm\llvm\utils\lit\tests\lit.cfg:50: note: Found python psutil module
-- Testing: 1 tests, 1 threads --
FAIL: lit :: shtest-format.py (1 of 1)
******************** TEST 'lit :: shtest-format.py' FAILED ********************
Script:
--
not C:\Python27\python.exe C:\Users\modocache\Source\fb\llvm\llvm\utils\lit\tests\..\lit.py -j 1 -v C:\Users\modocache\Source\fb\llvm\llvm\utils\lit\tests\..\tests\Inputs/shtest-format > C:\Users\modocache\Source\fb\llvm\llvm\utils\lit\tests\Output\shtest-format.py.tmp.out
FileCheck < C:\Users\modocache\Source\fb\llvm\llvm\utils\lit\tests\Output\shtest-format.py.tmp.out C:\Users\modocache\Source\fb\llvm\llvm\utils\lit\tests\shtest-format.py
--
C:\Users\modocache\Source\fb\llvm\llvm>python utils\lit\lit.py -v --path C:\Users\modocache\Source\fb\llvm\build\Debug\bin utils\lit\tests\discovery.py
lit.py: C:\Users\modocache\Source\fb\llvm\llvm\utils\lit\tests\lit.cfg:50: note: Found python psutil module
-- Testing: 1 tests, 1 threads --
FAIL: lit :: discovery.py (1 of 1)
******************** TEST 'lit :: discovery.py' FAILED ********************
Script:
--
C:\Python27\python.exe C:\Users\modocache\Source\fb\llvm\llvm\utils\lit\tests\..\lit.py C:\Users\modocache\Source\fb\llvm\llvm\utils\lit\tests\..\tests\Inputs/discovery -j 1 --debug --show-tests --show-suites -v > C:\Users\modocache\Source\fb\llvm\llvm\utils\lit\tests\Output\discovery.py.tmp.out 2> C:\Users\modocache\Source\fb\llvm\llvm\utils\lit\tests\Output\discovery.py.tmp.err
FileCheck --check-prefix=CHECK-BASIC-OUT < C:\Users\modocache\Source\fb\llvm\llvm\utils\lit\tests\Output\discovery.py.tmp.out C:\Users\modocache\Source\fb\llvm\llvm\utils\lit\tests\discovery.py
FileCheck --check-prefix=
diff --git a/test/CodeGen/ARM/swifterror.ll b/test/CodeGen/ARM/swifterror.ll
index b02adf7912b..afe83db64d0 100644
--- a/test/CodeGen/ARM/swifterror.ll
+++ b/test/CodeGen/ARM/swifterror.ll
@@ -1,5 +1,6 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=armv7-apple-ios | FileCheck --check-prefix=CHECK-APPLE --check-prefix=CHECK-ARMV7 %s
; RUN: llc -verify-machineinstrs -O0 < %s -mtriple=armv7-apple-ios | FileCheck --check-prefix=CHECK-O0 %s
+; RUN: llc -verify-machineinstrs < %s -mtriple=armv7-none-linux-androideabi | FileCheck --check-prefix=CHECK-ARMV7 %s
declare i8* @malloc(i64)
This file has been truncated, but you can view the full file.
utils/build-script --release --debug-swift --build-swift-dynamic-stdlib=0 --build-swift-static-stdlib=0 --build-swift-dynamic-sdk-overlay=0 --build-swift-static-sdk-overlay=0 -- --reconfigure
+ mkdir -p /Users/bgesiak/Source/apple/build/Ninja-ReleaseAssert+swift-DebugAssert
+ env HOST_VARIABLE_macosx_x86_64__SWIFT_BENCHMARK_TARGETS=swift-benchmark-macosx-x86_64 HOST_VARIABLE_macosx_x86_64__SWIFT_RUN_BENCHMARK_TARGETS=check-swift-benchmark-macosx-x86_64 'HOST_VARIABLE_macosx_x86_64__SWIFT_SDKS=IOS IOS_SIMULATOR OSX TVOS TVOS_SIMULATOR WATCHOS WATCHOS_SIMULATOR' HOST_VARIABLE_macosx_x86_64__SWIFT_STDLIB_TARGETS=swift-test-stdlib-macosx-x86_64 HOST_VARIABLE_macosx_x86_64__SWIFT_TEST_TARGETS= caffeinate /Users/bgesiak/Source/apple/swift/utils/build-script-impl --workspace /Users/bgesiak/Source/apple --build-dir /Users/bgesiak/Source/apple/build/Ninja-ReleaseAssert+swift-DebugAssert --install-prefix /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr --host-target macosx-x86_64 --std
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3c2e79a..a990e62 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -367,17 +367,7 @@ if(SWIFT_BUILT_STANDALONE)
endif()
precondition(CMAKE_SYSTEM_NAME)
-if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
- set(SWIFT_BUILD_SOURCEKIT_default TRUE)

I've been reading a lot of C++ code in the Swift and LLVM codebases recently. Some of the class declarations span thousands of lines of source code, with many nested class declarations. There are also multiple sections marked protected: -- in other words, not all protected methods can be found in a single place. Example: swift::Decl, which is ~700 LoC.

Experienced C++ coders:

  1. Is this a good way to organize C++ code? Or would it be more ideal if these declarations were broken down more? Why?
  2. Is there an easy way to determine, for example, whether swift::Decl is an abstract class? With 600 LoC and several layers of nesting, it's easy for me to get lost when scrolling through the code in Vim. Is this why people use IDEs?
diff --cc lib/IRGen/IRGenModule.cpp
index 099d3c0,03468f7..0000000
--- a/lib/IRGen/IRGenModule.cpp
+++ b/lib/IRGen/IRGenModule.cpp
@@@ -93,9 -93,7 +93,13 @@@ static clang::CodeGenerator *createClan
case IRGenDebugInfoKind::LineTables:
CGO.setDebugInfo(clang::codegenoptions::DebugInfoKind::DebugLineTablesOnly);
break;
++<<<<<<< a513ba4847a45aed980eb1a85b811edb9ff20412
+ case IRGenDebugInfoKind::ASTTypes: