Skip to content

🍒[lldb][cxx-interop] Populate C++ stdlib options correctly #10137

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
merged 1 commit into from
Mar 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3638,6 +3638,8 @@ void SwiftASTContext::InitializeSearchPathOptions(
}
invocation.getSearchPathOptions().setFrameworkSearchPaths(
invocation_framework_paths);

invocation.computeCXXStdlibOptions();
}

ThreadSafeASTContext SwiftASTContext::GetASTContext() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class TestSwiftForwardInteropSTLTypes(TestBase):
@swiftTest
def test(self):
self.build()
log = self.getBuildArtifact("types.log")
self.runCmd('log enable lldb types -f "%s"' % log)

_, _, _, _= lldbutil.run_to_source_breakpoint(
self, 'Set breakpoint here', lldb.SBFileSpec('main.swift'))
Expand Down Expand Up @@ -57,3 +59,7 @@ def test(self):
'[2] = 9.19'])
self.expect('expr vector', substrs=['CxxVector', '[0] = 4.1', '[1] = 3.7',
'[2] = 9.19'])

# Make sure lldb picks the correct C++ stdlib.
self.filecheck('platform shell cat "%s"' % log, __file__)
# CHECK-NOT: but current compilation uses unknown C++ stdlib