Skip to content

Reword error message (NFC) #8415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -692,8 +692,8 @@ SwiftLanguageRuntimeImpl::GetNumChildren(CompilerType type,
"without DWARF debug info",
type.GetMangledTypeName());
return llvm::make_error<llvm::StringError>(
"missing Clang debug info for type " +
type.GetDisplayTypeName().GetString(),
"missing debug info for Clang type \"" +
type.GetDisplayTypeName().GetString() + "\"",
llvm::inconvertibleErrorCode());
}
// Structs and Tuples.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
import lldbsuite.test.lldbutil as lldbutil
import unittest2

class TestSwiftLateSymbols(TestBase):
class TestSwiftErrorHandlingMissingTypes(TestBase):
NO_DEBUG_INFO_TESTCASE = True

@swiftTest
@skipIf(setting=('symbols.use-swift-clangimporter', 'true'))
def test_any_object_type(self):
"""Test the AnyObject type"""
def test(self):
"""Test that errors are surfaced"""
self.build()
self.expect('settings set symbols.use-swift-clangimporter false')
target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
Expand All @@ -20,4 +20,7 @@ def test_any_object_type(self):
val = var_object.GetChildAtIndex(1)
# FIXME: Should be True, for now it's just a string
self.assertFalse(val.GetError().Fail())
self.expect('v object', substrs=['missing Clang debug info', 'FromC'])
self.expect('v object',
substrs=['missing debug info for Clang type', 'FromC'])
self.expect('v enm',
substrs=['missing debug info for Clang type', 'ImportedEnum'])
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
struct FromC {
int i;
};

enum ImportedEnum {
someValue = 0
};
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
func use<T>(_ t: T) {}
func main() {
var object = (1, FromC(i: 23), 2)
use(object) // break here
var enm: ImportedEnum = someValue
use((object, enm)) // break here
}
main()