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

Skip to content

Commit e0a6ccb

Browse files
Merge pull request swiftlang#10137 from swiftlang/egorzhdan/6.1-lldb-cxxstdlib
🍒[lldb][cxx-interop] Populate C++ stdlib options correctly
2 parents 5e36f06 + 295e3d3 commit e0a6ccb

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

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

+2
Original file line numberDiff line numberDiff line change
@@ -3638,6 +3638,8 @@ void SwiftASTContext::InitializeSearchPathOptions(
36383638
}
36393639
invocation.getSearchPathOptions().setFrameworkSearchPaths(
36403640
invocation_framework_paths);
3641+
3642+
invocation.computeCXXStdlibOptions();
36413643
}
36423644

36433645
ThreadSafeASTContext SwiftASTContext::GetASTContext() {

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

+6
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ class TestSwiftForwardInteropSTLTypes(TestBase):
1414
@swiftTest
1515
def test(self):
1616
self.build()
17+
log = self.getBuildArtifact("types.log")
18+
self.runCmd('log enable lldb types -f "%s"' % log)
1719

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

0 commit comments

Comments
 (0)