Skip to content

Commit 97e95e0

Browse files
Merge pull request swiftlang#9349 from adrian-prantl/135575668
[lldb] Fix an incorrect trigger of a per-module scratch context
2 parents c4b0fdf + f2c776f commit 97e95e0

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

lldb/source/Plugins/ExpressionParser/Swift/SwiftExpressionParser.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,9 +1389,13 @@ SwiftExpressionParser::ParseAndImport(
13891389
// GetImplicitImports.
13901390
swift::performImportResolution(*source_file);
13911391

1392-
if (expr_diagnostics.HasErrors())
1393-
return make_error<ModuleImportError>(
1394-
llvm::toString(expr_diagnostics.GetAllErrors()));
1392+
if (expr_diagnostics.HasErrors()) {
1393+
// FIXME: This could be done more elegantly.
1394+
std::string msg = llvm::toString(expr_diagnostics.GetAllErrors());
1395+
if (StringRef(msg).contains(": could not build module "))
1396+
return make_error<ModuleImportError>(msg);
1397+
return llvm::createStringError(msg);
1398+
}
13951399

13961400
std::unique_ptr<SwiftASTManipulator> code_manipulator;
13971401
if (repl || !playground) {

lldb/test/API/lang/swift/clangimporter/expr_import/TestSwiftExprImport.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from lldbsuite.test.decorators import *
44
import lldbsuite.test.lldbutil as lldbutil
55

6-
@skipIf(bugnumber = "rdar://135575668")
76
class TestSwiftExprImport(TestBase):
87
# Don't run ClangImporter tests if Clangimporter is disabled.
98
@skipIf(setting=('symbols.use-swift-clangimporter', 'false'))

lldb/test/API/lang/swift/expression/simple/TestSwiftSimpleExpressions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222

2323
class TestSwiftSimpleExpressions(TestBase):
24-
@skipIf(bugnumber = "rdar://135575668")
2524
@swiftTest
2625
def test_simple_swift_expressions(self):
2726
"""Tests that we can run simple Swift expressions correctly"""

0 commit comments

Comments
 (0)