C++ types declared within unimportable type are not imported
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 70.4k
- Forks
- 10.8k
- PR merge metrics
- PR metrics pending
Description
The MLIRContext C++ type is not imported into Swift by default, because is has a deleted copy constructor: https://github.com/llvm/llvm-project/blob/f0cd5389850589fbf8a3ce77cea2539579bd8028/mlir/include/mlir/IR/MLIRContext.h#L55
However, another type (Threading) declared within MLIRContext is not imported, even though there is nothing preventing Swift from importing it.
https://github.com/llvm/llvm-project/blob/f0cd5389850589fbf8a3ce77cea2539579bd8028/mlir/include/mlir/IR/MLIRContext.h#L57
Can Swift treat MLIRContext as a namespace in this case, importing it as an enum with no cases?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked MLIRContext.h declaration and trace the Swift C++ importer’s handling of nested types whose enclosing C++ type is not imported. Determine the relevant importer test area, then define regression coverage for importing Threading without importing MLIRContext itself.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, swift
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100