diff --git a/lldb/source/Plugins/ExpressionParser/Swift/SwiftExpressionParser.cpp b/lldb/source/Plugins/ExpressionParser/Swift/SwiftExpressionParser.cpp index 1cd9fcb94f538..bec0cbf9180bb 100644 --- a/lldb/source/Plugins/ExpressionParser/Swift/SwiftExpressionParser.cpp +++ b/lldb/source/Plugins/ExpressionParser/Swift/SwiftExpressionParser.cpp @@ -1389,9 +1389,13 @@ SwiftExpressionParser::ParseAndImport( // GetImplicitImports. swift::performImportResolution(*source_file); - if (expr_diagnostics.HasErrors()) - return make_error( - llvm::toString(expr_diagnostics.GetAllErrors())); + if (expr_diagnostics.HasErrors()) { + // FIXME: This could be done more elegantly. + std::string msg = llvm::toString(expr_diagnostics.GetAllErrors()); + if (StringRef(msg).contains(": could not build module ")) + return make_error(msg); + return llvm::createStringError(msg); + } std::unique_ptr code_manipulator; if (repl || !playground) { diff --git a/lldb/test/API/lang/swift/clangimporter/expr_import/TestSwiftExprImport.py b/lldb/test/API/lang/swift/clangimporter/expr_import/TestSwiftExprImport.py index 44aba68145d3f..84d9e7a369f77 100644 --- a/lldb/test/API/lang/swift/clangimporter/expr_import/TestSwiftExprImport.py +++ b/lldb/test/API/lang/swift/clangimporter/expr_import/TestSwiftExprImport.py @@ -3,7 +3,6 @@ from lldbsuite.test.decorators import * import lldbsuite.test.lldbutil as lldbutil -@skipIf(bugnumber = "rdar://135575668") class TestSwiftExprImport(TestBase): # Don't run ClangImporter tests if Clangimporter is disabled. @skipIf(setting=('symbols.use-swift-clangimporter', 'false')) diff --git a/lldb/test/API/lang/swift/expression/simple/TestSwiftSimpleExpressions.py b/lldb/test/API/lang/swift/expression/simple/TestSwiftSimpleExpressions.py index 884bab26b28a1..e5159b5ed75c5 100644 --- a/lldb/test/API/lang/swift/expression/simple/TestSwiftSimpleExpressions.py +++ b/lldb/test/API/lang/swift/expression/simple/TestSwiftSimpleExpressions.py @@ -21,7 +21,6 @@ class TestSwiftSimpleExpressions(TestBase): - @skipIf(bugnumber = "rdar://135575668") @swiftTest def test_simple_swift_expressions(self): """Tests that we can run simple Swift expressions correctly"""