Skip to content

Commit a2f55fd

Browse files
adrian-prantlaugusto2112
authored andcommitted
[lldb] Fix a regression in SBValue::GetObjectDescription() (llvm#117242)
The old behavior was to return a null string in the error case,when refactoring the error handling I thought it would be a good idea to print the error in the description, but that breaks clients that try to print a description first and then do something else in the error case. The API is not great but it's clear that in-band errors are also not a good idea. rdar://133956263 (cherry picked from commit 7553fb1) Conflicts: lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py (cherry picked from commit 091aa23)
1 parent f31ba45 commit a2f55fd

File tree

1 file changed

+1
-1
lines changed
  • lldb/test/API/lang/swift/po/uninitialized

1 file changed

+1
-1
lines changed

lldb/test/API/lang/swift/po/uninitialized/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class POClass {
1515

1616
func main() {
1717
var object: POClass
18-
object = POClass() //% self.assertTrue(self.frame().FindVariable('object').GetObjectDescription() == 'error: <uninitialized>', 'po correctly detects uninitialized instances')
18+
object = POClass() //% self.assertEqual(self.frame().FindVariable('object').GetObjectDescription(), None, 'po correctly detects uninitialized instances'); self.expect("po object", substrs=["<uninitialized>"])
1919
print("yay I am done") //% self.assertTrue('POClass:' in self.frame().FindVariable('object').GetObjectDescription())
2020
}
2121

0 commit comments

Comments
 (0)