forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 332
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
[DRAFT] Swift telemetry #9668
Closed
Closed
[DRAFT] Swift telemetry #9668
Conversation
This file contains 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
This patch fixes: lldb/source/Plugins/SystemRuntime/MacOSX/AbortWithPayloadFrameRecognizer.cpp:177:10: error: unused variable 'str_len' [-Werror,-Wunused-variable] (cherry picked from commit 1fcddc0)
[cherry-pick][lldb] Fix a warning
and emit the information to a file in JSON format Environmental variable CLANG_COMPILER_OBJC_MESSAGE_TRACE_PATH must be set to enable this.
…load [lldb] Create dependent modules in parallel (llvm#114507)
CMP0156 removes duplicate library links based on linker capabilities. The new Apple linker emits warnings when libraries are repeated on the link line because they do not have an effect. Enabling this policy will remove the duplicate libraries, fixing these warnings.
When you set a "next branch breakpoint" and run to it while stepping, you have to claim the stop at that breakpoint to be the top of the inlined call stack, or you will seem to "step in" and then plans might try to step back out again. This records the PrefferedLineEntry for next branch breakpoints and adds a test to make sure this works. (cherry picked from commit 23a01a4)
I have to check for the sc list size being changed by the call-site search, not just that it had more than one element. Added a test for multiple CU's with the same name in a given module, which would have caught this mistake. We were also doing all the work to find call sites when the found decl and specified decl's only difference was a column, but the incoming specification hadn't specified a column (column number == 0). (cherry picked from commit 803f957)
The codecvt header has been deprecated in C++17. Use LLVM's unicode helpers to convert between UTF-8 and UTF-16. (cherry picked from commit 4927725)
We are able to calculate the spare bits mask from other information. Remove this from the LLVM IR representation and DWARF.
Without this change, the Swift compiler build is fully of spammy warnings like this: ``` .../DependentDiagnostic.h:152:8: warning: cycle detected while resolving 'ddiag_iterator' in swift_name attribute for 'operator==' bool operator==(ddiag_iterator Other) const { ^ .../DependentDiagnostic.h:127:20: note: while resolving 'DeclContext' in swift_name attribute for 'ddiag_iterator' class DeclContext::ddiag_iterator { ^ .../DependentDiagnostic.h:152:8: note: please report this issue to the owners of 'Clang_AST.DeclBase' bool operator==(ddiag_iterator Other) const { ^ ```
The slide calculation was incorrectly negating an unsigned integer and passing it to a call to SaturatingAdd. The section load address should always be larger than the section file address, so change the underflow check to a comparison instead. (cherry picked from commit 61f28df)
(cherry picked from commit f30387f)
These tests are passing on 15.1: rdar://139217313
…0240723-scanner-perf 🍒 [clang][deps][modules] Speed up dependency scanning
…016268e4a10109f1db2e53c60d35881 [lldb] Use LLVM's helper for Unicode conversion (NFC) (llvm#112582)
Skip tests known to fail on 15.0
(cherry picked from commit bd3a395)
…debug-2 [DebugInfo] Remove spare bits mask from LLVM IR and DWARF
Errors like "cannot create bundle: Not a directory" or "error: a.out.dSYM: Is a directory" were being emitted without a newline. (cherry picked from commit bbc3af0)
It is legal to import a Clang submodule using Module.Submodule syntax. LLDB was not handling this correctly when doing contextual imports and stripped everything but the base name. rdar://137003294
An extra inhabitant is a bit pattern that does not represent a valid value for instances of a given type. The number of extra inhabitants is the number of those bit configurations. This is used by Swift to save space when composing types. For example, because Bool only needs 2 bit patterns to represent all of its values (true and false), an Optional<Bool> only occupies 1 byte in memory by using a bit configuration that is unused by Bool. Which bit patterns are unused are part of the ABI of the language. Since Swift generics are not monomorphized, by using dynamic libraries you can have generic types whose size, alignment, etc, are known only at runtime (which is why this feature is needed). This patch adds num_extra_inhabitants to LLVM-IR debug info and in DWARF as an Apple extension. (cherry picked from commit f6617d6)
…terop-cycle-warnings-20240723 [stable/20240723] Suppress warnings for Swift C++ interop by hiding operator declarations.
[lldb] Fix deprecated defines in debugserver (XROS -> VISIONOS) (NFC)
After Swift PR llvm#77323, we import C++ source locations for imported code. This improves some diagnostics but also breaks some of the heuristics LLDB have to select the right frame on traps. This PR marks the test XFAIL until we figure out a better heuristic to stop at the right frame. This is not a trivial question as we cannot just mark all C++ imported source locations artifical, some of that code is user written, some is not (coming from frameworks, STL). Moreover, some users might prefer to stop in the C++ code and some users might prefer to stop in Swift code.
…llvm#114241) This is needed for a private patch we'll be upstreaming in the future. rdar://138459863
…e-cmp0156 🍒[CMake] Enable CMP0156 if available
[lldb] Implement support for Clang Submodule imports in Swift contexts.
[lldb] Mark forward C++ interop test XFAIL
…t-release-6.1-lldb-Acquire-the-map-lock-after-deriving-the-lookup-key [Cherry-pick into swift/release/6.1] [lldb] Acquire the map lock after deriving the lookup key
…t-release-6.1-Add-missing-nullptr-checks [Cherry-pick into swift/release/6.1] Add missing nullptr checks
rdar://136981955
…e-api-swiftexpressionparser-stable0723 [lldb][Plugins][Swift] Reflect API changes in `SwiftExpressionParser`
…ease/6.1-dd78d7c7be5b-bf1c3c2deea9 [🍒 swift/release/6.1] [lldb] Update TestSwiftREPLCompletion for completion changes
Augment CODEOWNERS for LLDB Swift support
…lobify-imports 🍒 [clang][serialization] Blobify IMPORTS strings and signatures
[lldb] Expose explicit modules as language specific data
Arguably as a bug, Clang has previously not mixed up Objective-C parameter names with types. This allows developers to write parameter names that _should_ shadow type names, but don't. For instance: @interface Foo -(void)foo:(int)id bar:(id)name; // OK @EnD Commit 9778808 changed the way that parameters are parsed to bring it more in line with how C parameters are parsed, but it breaks the example above. Given an expectation that the change wouldn't introduce source breaks, this is not something we can go forward with. 977880... did this so that late-parsed attributes could reference Objective-C parameters. This change buffers Objective-C parameter info until after all parameters are parsed and turns them into parameter declarations before realizing late-parsed attributes instead. Radar-ID: 139996306
The refactored code did not correctly determine the type of expression errors. rdar://139699028 (cherry picked from commit a3e2f0a)
[lldb] Update for removal of `ModuleDecl::addFile`
…t-release-6.1-lldb-Fix-a-regression-in-Status-GetErrorType-117095 [Cherry-pick into swift/release/6.1] [lldb] Fix a regression in Status::GetErrorType() (llvm#117095)
sdkitono
requested review from
JDevlieghere,
daniel-grumberg,
QuietMisdreavus,
keith and
dcci
as code owners
November 23, 2024 22:48
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.
No description provided.