Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[DebugInfo] Emit debug info for witness tables #79171

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

augusto2112
Copy link
Contributor

This change emits debug info for witness tables passed into generic functions when a generic type is constrained to a protocol. This information is required for LLDB's generic expression evaluator to work in such functions.

rdar://104446865

@augusto2112
Copy link
Contributor Author

@swift-ci smoke test


void IRGenDebugInfoImpl::emitWitnessTable(IRGenFunction &IGF,
llvm::Value *Metadata, unsigned Depth,
unsigned Index,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keying this off of depth/index is insufficient. Eg in the following, we pass a witness table for the T.Element: Equatable conformance:

func f<T: Sequence>(_: T) where T.Element: Sequence {}

@augusto2112 augusto2112 force-pushed the debug-info-witness-table branch from 7cd787f to f2e2e94 Compare February 13, 2025 23:46
@augusto2112
Copy link
Contributor Author

@swift-ci test

@augusto2112 augusto2112 force-pushed the debug-info-witness-table branch from f2e2e94 to 32f2cda Compare February 14, 2025 22:15
@augusto2112
Copy link
Contributor Author

@swift-ci test

2 similar comments
@augusto2112
Copy link
Contributor Author

@swift-ci test

@augusto2112
Copy link
Contributor Author

@swift-ci test

@augusto2112
Copy link
Contributor Author

@swift-ci test

@augusto2112 augusto2112 force-pushed the debug-info-witness-table branch from 2d034a9 to d48a30b Compare February 20, 2025 20:24
@augusto2112
Copy link
Contributor Author

augusto2112 commented Feb 20, 2025

@swift-ci test

@augusto2112 augusto2112 force-pushed the debug-info-witness-table branch from d48a30b to 2f59d26 Compare February 20, 2025 21:12
@augusto2112
Copy link
Contributor Author

@swift-ci test

@augusto2112 augusto2112 force-pushed the debug-info-witness-table branch from 2f59d26 to 126fa9e Compare February 21, 2025 18:59
@augusto2112
Copy link
Contributor Author

@swift-ci test

2 similar comments
@augusto2112
Copy link
Contributor Author

@swift-ci test

@augusto2112
Copy link
Contributor Author

@swift-ci test

@augusto2112 augusto2112 force-pushed the debug-info-witness-table branch from 126fa9e to c6803d6 Compare April 4, 2025 22:15
@augusto2112
Copy link
Contributor Author

@swift-ci test

@augusto2112 augusto2112 force-pushed the debug-info-witness-table branch from c6803d6 to 143f274 Compare April 9, 2025 23:09
@augusto2112
Copy link
Contributor Author

@swift-ci test

@augusto2112 augusto2112 force-pushed the debug-info-witness-table branch from 143f274 to 331e9e7 Compare April 10, 2025 17:59
@augusto2112
Copy link
Contributor Author

@swift-ci test

@augusto2112 augusto2112 force-pushed the debug-info-witness-table branch from 331e9e7 to 29c87df Compare April 10, 2025 21:19
@augusto2112
Copy link
Contributor Author

@swift-ci test

This change emits debug info for witness tables passed into generic
functions when a generic type is constrained to a protocol. This
information is required for LLDB's generic expression evaluator
to work in such functions.

rdar://104446865
@augusto2112
Copy link
Contributor Author

@swift-ci test

@augusto2112 augusto2112 force-pushed the debug-info-witness-table branch from 29c87df to 66748f7 Compare April 30, 2025 19:33
@augusto2112
Copy link
Contributor Author

@swift-ci test

1 similar comment
@augusto2112
Copy link
Contributor Author

@swift-ci test

@adrian-prantl
Copy link
Contributor

@swift-ci test source compatibility

@augusto2112
Copy link
Contributor Author

I think source compatibility passed, I see this at the end of the logs:

[2025-05-06T06:22:39.777Z] Action Summary:
[2025-05-06T06:22:39.777Z]      Passed: 354
[2025-05-06T06:22:39.777Z]      Failed: 0
[2025-05-06T06:22:39.777Z]     XFailed: 39
[2025-05-06T06:22:39.777Z]     UPassed: 0
[2025-05-06T06:22:39.777Z]       Total: 393
[2025-05-06T06:22:39.777Z] ========================================
[2025-05-06T06:22:39.777Z] Repository Summary:
[2025-05-06T06:22:39.777Z]       Total: 144
[2025-05-06T06:22:39.777Z] ========================================
[2025-05-06T06:22:39.777Z] Result: XFAIL

And later:

[2025-05-06T06:22:55.206Z] + ./swift-source-compat-suite/cleanup main
[2025-05-06T06:22:55.461Z] ** CLEANUP **
[2025-05-06T06:22:55.461Z] Deleting build and source directories...
[2025-05-06T06:28:25.205Z] Cancelling nested steps due to timeout
[2025-05-06T06:28:25.207Z] Sending interrupt signal to process
[2025-05-06T06:28:32.415Z] Traceback (most recent call last):
[2025-05-06T06:28:32.415Z]   File "/Users/ec2-user/jenkins/workspace/swift-PR-source-compat-suite-debug-macos/./swift-source-compat-suite/cleanup", line 95, in <module>
[2025-05-06T06:28:32.415Z]     sys.exit(main())
[2025-05-06T06:28:32.415Z]   File "/Users/ec2-user/jenkins/workspace/swift-PR-source-compat-suite-debug-macos/./swift-source-compat-suite/cleanup", line 80, in main
[2025-05-06T06:28:32.415Z]     common.check_execute([
[2025-05-06T06:28:32.415Z]   File "/Users/ec2-user/jenkins/workspace/swift-PR-source-compat-suite-debug-macos/swift-source-compat-suite/common.py", line 220, in check_execute
[2025-05-06T06:28:32.415Z] /Users/ec2-user/jenkins/workspace/swift-PR-source-compat-suite-debug-macos@tmp/durable-1321e01a/script.sh.copy: line 1: 34317 Terminated: 15          ./swift-source-compat-suite/cleanup main
[2025-05-06T06:28:32.418Z] script returned exit code 143

I'll rerun it just in case though

@augusto2112
Copy link
Contributor Author

@swift-ci test source compatibility

1 similar comment
@augusto2112
Copy link
Contributor Author

@swift-ci test source compatibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants