* Use the correct Python executable to match LLDB
The linux-fatal-backtrace script needs to run with an LLDB
module loaded into Python. This in turn requires that the
test be run with the exact same Python version as was used
by LLDB (not just the same Python module directory). This
can get confused on systems with multiple versions of Python
installed.
This replaces `lldb-python-path` (the Python module directory path)
with `lldb-python` (which is the correct Python version run with
the LLDB path). This should ensure that this test is always
run with the same Python version and module that LLDB used.
* Use consistent braces for the lldb-python substitution
* Use os.path utilities to dissect paths
* Allow `python3` as a path identifier
Previous code required a decimal point before it would
recognize a path component as a Python version identifier,
so it would accept `python2.7` but not `python3`.
This fixes the last couple of instances of the interpreter not being
passed to the python the scripts which makes them fail on OSes where
shebangs are not honoured (i.e. Windows)
This test broke when we switched to the swift-4.2-branch of Clang/LLVM.
It seems to be a problem with LLDB's CreateTargetWithFileAndArch() API
(rdar://problem/39960149). In the meantime, since this script does not
really need to specify the architecture, we can work around the problem
by using CreateTarget(). That's simpler anyway.
rdar://problem/38181372
This converts the instances of the pattern for which we have a proper
substitution in lit. This will make it easier to replace it
appropriately with Windows equivalents.
The best guess so far is that the failure that caused the test to be
disabled was a consequence of not running a clean build to regenerate
the lit.site.cfg file so that the "REQUIRES: lldb" check gave the wrong
answer. rdar://problem/33718631
* Revert "[strip -ST] Disable runtime stack trace dumping on Darwin when asserts are disabled."
This reverts commit 6bc28ff1c9.
* Bring back important fixes from the revert of 6bc28ff1c9.
* Change swift::swift_reportError to only print the backtrace in assert builds (swift::warning prints backtrace always).
This commit disables runtime stack trace dumping via dladdr on Darwin when
asserts are disabled.
This stack trace dumping was added as a way to improve the ability to debug the
compiler for compiler developers. This is all well and good but having such a
feature always enabled prevents us from reducing the size of the swift standard
library by eliminating the swift nlist.
rdar://31372220
Hoist alloc_stack instructions of 'generic' or resilient type to the entry
block. At the same time also perform a very simple stack coloring analysis.
This does not use a true liveness-analysis yet but rather employs some simple
conservative checks to see whether the live ranges of two alloc_stacks might
interfere.
AllocStackHoisting is an IRGen SIL pass. This allows for using IRGen's type
lowering information. Furthermore, hoisting and merging the alloc_stack
instructions this late does not interfere with SIL optimizations because the
resulting SIL never gets serialized.