Skip to content

Commit 8194da8

Browse files
committed
Reword error message (NFC)
1 parent 6e0b031 commit 8194da8

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

lldb/source/Plugins/LanguageRuntime/Swift/SwiftLanguageRuntimeDynamicTypeResolution.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,8 +692,8 @@ SwiftLanguageRuntimeImpl::GetNumChildren(CompilerType type,
692692
"without DWARF debug info",
693693
type.GetMangledTypeName());
694694
return llvm::make_error<llvm::StringError>(
695-
"missing Clang debug info for type " +
696-
type.GetDisplayTypeName().GetString(),
695+
"missing debug info for Clang type \"" +
696+
type.GetDisplayTypeName().GetString() + "\"",
697697
llvm::inconvertibleErrorCode());
698698
}
699699
// Structs and Tuples.

lldb/test/API/lang/swift/error_handling_missing_type/TestSwiftErrorHandlingMissingType.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
import lldbsuite.test.lldbutil as lldbutil
55
import unittest2
66

7-
class TestSwiftLateSymbols(TestBase):
7+
class TestSwiftErrorHandlingMissingTypes(TestBase):
88
NO_DEBUG_INFO_TESTCASE = True
99

1010
@swiftTest
1111
@skipIf(setting=('symbols.use-swift-clangimporter', 'true'))
12-
def test_any_object_type(self):
13-
"""Test the AnyObject type"""
12+
def test(self):
13+
"""Test that errors are surfaced"""
1414
self.build()
1515
self.expect('settings set symbols.use-swift-clangimporter false')
1616
target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
@@ -20,4 +20,7 @@ def test_any_object_type(self):
2020
val = var_object.GetChildAtIndex(1)
2121
# FIXME: Should be True, for now it's just a string
2222
self.assertFalse(val.GetError().Fail())
23-
self.expect('v object', substrs=['missing Clang debug info', 'FromC'])
23+
self.expect('v object',
24+
substrs=['missing debug info for Clang type', 'FromC'])
25+
self.expect('v enm',
26+
substrs=['missing debug info for Clang type', 'ImportedEnum'])
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
struct FromC {
22
int i;
33
};
4+
5+
enum ImportedEnum {
6+
someValue = 0
7+
};
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
func use<T>(_ t: T) {}
22
func main() {
33
var object = (1, FromC(i: 23), 2)
4-
use(object) // break here
4+
var enm: ImportedEnum = someValue
5+
use((object, enm)) // break here
56
}
67
main()

0 commit comments

Comments
 (0)