Skip to content

Commit 82c52e6

Browse files
Merge pull request #10084 from swiftlang/egorzhdan/20240723-lldb-cxxstdlib
[lldb][cxx-interop] Populate C++ stdlib options correctly
2 parents bb5f004 + 24bff50 commit 82c52e6

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3642,6 +3642,8 @@ void SwiftASTContext::InitializeSearchPathOptions(
36423642
}
36433643
invocation.getSearchPathOptions().setFrameworkSearchPaths(
36443644
invocation_framework_paths);
3645+
3646+
invocation.computeCXXStdlibOptions();
36453647
}
36463648

36473649
ThreadSafeASTContext SwiftASTContext::GetASTContext() {

lldb/test/API/lang/swift/cxx_interop/forward/stl-types/TestSwiftForwardInteropSTLTypes.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class TestSwiftForwardInteropSTLTypes(TestBase):
1313
@swiftTest
1414
def test(self):
1515
self.build()
16+
log = self.getBuildArtifact("types.log")
17+
self.runCmd('log enable lldb types -f "%s"' % log)
1618

1719
_, _, _, _= lldbutil.run_to_source_breakpoint(
1820
self, 'Set breakpoint here', lldb.SBFileSpec('main.swift'))
@@ -56,3 +58,7 @@ def test(self):
5658
'[2] = 9.19'])
5759
self.expect('expr vector', substrs=['CxxVector', '[0] = 4.1', '[1] = 3.7',
5860
'[2] = 9.19'])
61+
62+
# Make sure lldb picks the correct C++ stdlib.
63+
self.filecheck('platform shell cat "%s"' % log, __file__)
64+
# CHECK-NOT: but current compilation uses unknown C++ stdlib

0 commit comments

Comments
 (0)