-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Finish merge from swift-DEVELOPMENT-SNAPSHOT-2019-10-08-a #27693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ror/warning Add a new type of diagnostic transaction, CompoundDiagnosticTransaction. The first diagnostic emitted inside the transaction will become the parent of the subsequent notes. DiagnosticConsumers may opt in to consuming these child notes alongside the parent diagnostic, or they can continue to consider them seperately. Moved PrintingDiagnosticConsumer and a couple of diagnostics to the new system as a proof of concept.
…need to be used manually in simple cases
discovering the beginning of the string interpolation passed to os log APIs. The implementation follows the chain of dependencies starting from an initializer call to OSLogMessage until the first instruction of interpolation is discovered. This is more robust towards changes to the SIL generation of string interpolation literals.
Identifier contains a pointer to character data, and we need to ensure that this pointer has enough spare bits in it for DeclBaseName and DeclName. This currently happens to be true because the StringMap used to intern Identifier pointers happens to place a 32-bit size field in the MapTableEntry object, but it would be better to explicitly force the alignment we want and assert that it’s correct.
…erify-all if we hit a verifier error before ownership lowering. We have been getting a bunch of different bugs reported that were initially identified as being caused by the ownership model eliminator (due to this verification failure), but that turned out in reality to be a different failure. To ease triaging, this commit puts in a pretty stack trace msg that tells the person doing the triaging to re-run with -sil-verify-all enabled to track down the actual pass that introduces the verification failure.
… vm address. As the base of the "remote" address space ObjectMemoryReader presents for an image, use the image's own preferred VM address mappings. If there are multiple images loaded, differentiate them by using the top 16 bits of the remote address space as an index into the array of images. This should make it so that absolute pointers in the file Just Work without sliding in most cases; we'd only need to mix in the image index in order to have a value that is also a valid remote address.
The CMemoryReader interface relies on a `GetStringLength` callback, which returns zero either if the address is invalid or if a valid zero-length string exists at the given address. We don't want to break ABI with RemoteMirror, but we can work around this by issuing a one-byte read at the address and confirming that a null terminator exists there.
- Ensure QuotedString prints characters as `char` and not as an integer-like `unsigned char` - Assert when trying to add a null child node to a Demangle::Node
When resolving a pointer value in a Mach-O image, look through the binding list to see if a symbol address will be added at a given location, and return an unresolved `RemoteAbsolutePointer` with the symbol name if so.
…tforms) Now that `swift-reflection-dump` correctly handles pointer values and unresolved cross-image references (for Mach-O, at least), we can safely unconditionally use symbolic references in runtime mangled names without regressing offline reflection support.
…dd test to verify.
Struct/union fields, ObjC properties, ObjC methods
Fairly simple except in the few cases they aren't.
This reverts commit b3ac66a. This is problematic when [thunk] functions get inlined into and the function from which we inline expects a framepointer. Specifically, _swift_os_log_return_address() reads the framepointer. rdar://55852225
…IB` build With such a build we avoid linking the `clangAST` library.
This commit changes `getArgumentExprFor` to take a ConstraintLocator argument from which to find the argument list. This lets us properly handle the case where we have a key path subscript locator. In addition, this commit renames the member to `getArgumentListExprFor` to make it clear we're returning the argument list expression rather than a single argument. Resolves SR-11562.
…thunks Revert "IRGen: Leave frame pointers off SIL functions marked [thunk]."
[docs] CToSwift: Add ObjC properties section, finish swift_name section
We have a lot of "transform a range" types already: llvm::mapped_iterator, swift::TransformRange and swift::TransformIterator, and swift::ArrayRefView for static transformations. This gets rid of one more layer without losing any real functionality.
No functionality change ("unused")
…r library for embedded platforms
[NFC] Explicitly control alignment of Identifiers
This relied on UB as per [meta.rqmts]p4 (http://eel.is/c++draft/meta#rqmts-4) and has been UB since C++11 20.9.2p1 has the same restriction. MSVC 19.24 became more stringent and silently ignores this now, preventing the Swift build. Require the user to explicitly pass in `-DSWIFT_PERMIT_UNDEFINED_BEHAVIOR` to get the dump functionality.
…3f4403be592012 [ownership] Emit a PrettyStackTrace msg telling to re-run with -sil-v…
While most -Xcc options turn into options that affect the Clang module cache hash, some, like search paths, do not, and that can have a drastic effect on PCH contents. When combined with places where Xcode will modify invocations to add extra -Xcc options (see rdar://problem/23297285), this can lead to crashes where the modified-invocation PCH is used to compile source files in incremental mode, and then the original, non-precompiled bridging header is used for module merging. Let's just be conservative and include -Xcc options in the Swift-side PCH uniqueness hash. rdar://problem/33837253
Update instructions for building LLDB
The XXOptUtils.h convention is already established and parallels the SIL/XXUtils convention. New: - InstOptUtils.h - CFGOptUtils.h - BasicBlockOptUtils.h - ValueLifetime.h Removed: - Local.h - Two conflicting CFG.h files This reorganization is helpful before I introduce more utilities for block cloning similar to SinkAddressProjections. Move the control flow utilies out of Local.h, which was an unreadable, unprincipled mess. Rename it to InstOptUtils.h, and confine it to small APIs for working with individual instructions. These are the optimizer's additions to /SIL/InstUtils.h. Rename CFG.h to CFGOptUtils.h and remove the one in /Analysis. Now there is only SIL/CFG.h, resolving the naming conflict within the swift project (this has always been a problem for source tools). Limit this header to low-level APIs for working with branches and CFG edges. Add BasicBlockOptUtils.h for block level transforms (it makes me sad that I can't use BBOptUtils.h, but SIL already has BasicBlockUtils.h). These are larger APIs for cloning or removing whole blocks.
Closure bodies should only be visited for coverage purposes once -- when the associated SILFunction is created. This resolves an assertion failure about an empty region stack (this root cause of which was double-visitation of a closure body).
[build-script-impl] Handle multiple version directories in TOOLCHAIN/usr/lib/clang.
Use the accessor names as written in Objective-C.
[SyntaxParse] Parse IdentifierExpr syntax
[NFC] Add a short note on what USRs are and what they're used for.
…ckout Remove special case for swift-ci in update-checkout.
…27552) No functionality change.
Since the storage is a multiple of uint64_t (derived by what LLVM's APInt does) we want to check for 2*uin64_t here, even on 32bit platforms.
This is useful for cross-compiling. <rdar://problem/55916729>
[build-script] Pass updated arguments to SwiftSyntax's build script
…impl to install the compiler-rt builtins to only 'ls' directories that exist.
[build-script] Fix issue with installing SwiftSyntax if target dir does not exist
rxwei
approved these changes
Oct 15, 2019
asuhan
commented
Oct 15, 2019
dan-zheng
approved these changes
Oct 15, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed this PR is to apple/tensorflow-merge
branch - a final PR to apple/tensorflow
will be needed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are some changes I've missed in previous rounds.