Skip to content

Conversation

@cachemeifyoucan
Copy link
Contributor

@cachemeifyoucan cachemeifyoucan commented Dec 15, 2025

  • Explanation: In the explicit module loaders, findModuleFilesInDirectory() is not a supported operation and swift compiler is not expected to call this function, thus it uses llvm_unreachable. However, LLDB and other clients can configure module loader that allow fallbacks from explicit module loaders, thus we should function calls to actually return and not terminating the process. Just let the function return not_supported.
  • Scope: For LLDB usage of the explicit module loader.
  • Issues: rdar://166557713
  • Original PRs: [ModuleLoader] Remove llvm_unreachable in findModuleFilesInDirectory() #86064
  • Risk: Low. Remove llvm_unreachable
  • Testing: Covered by lldb test cases.
  • Reviewers: @artemcm

In the explicit module loaders, findModuleFilesInDirectory() is not a
supported operation and swift compiler is not expected to call this
function, thus it uses `llvm_unreachable`. However, LLDB and other
clients can configure module loader that allow fallbacks from explicit
module loaders, thus we should function calls to actually return and not
terminating the process. Just let the function return `not_supported`.

rdar://166557713
@cachemeifyoucan cachemeifyoucan requested a review from a team as a code owner December 15, 2025 20:10
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please test

@cachemeifyoucan cachemeifyoucan changed the title [ModuleLoader] Remove llvm_unreachable in findModuleFilesInDirectory() [6.3][ModuleLoader] Remove llvm_unreachable in findModuleFilesInDirectory() Dec 15, 2025
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.

1 participant