Skip to content

Commit 89cd623

Browse files
Merge pull request #8613 from adrian-prantl/cherry-pick-swift-release-6.0-lldb-Provide-a-better-error-message-for-missing-symbols-89433
[Cherry-pick into swift/release/6.0] [lldb] Provide a better error message for missing symbols (llvm#89433)
2 parents 94447cf + b6a3144 commit 89cd623

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lldb/source/Expression/IRExecutionUnit.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,9 @@ void IRExecutionUnit::GetRunnableInfo(Status &error, lldb::addr_t &func_addr,
476476
}
477477

478478
m_failed_lookups.clear();
479-
479+
ss.PutCString(
480+
"\nHint: The expression tried to call a function that is not present "
481+
"in the target, perhaps because it was optimized out by the compiler.");
480482
error.SetErrorString(ss.GetString());
481483

482484
return;

lldb/test/API/lang/cpp/constructors/TestCppConstructors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def test_constructors(self):
4747
self.expect(
4848
"expr ClassWithDeletedDefaultCtor().value",
4949
error=True,
50-
substrs=["Couldn't look up symbols:"],
50+
substrs=["Couldn't look up symbols:", "function", "optimized out"],
5151
)
5252

5353
@skipIfWindows # Can't find operator new.

0 commit comments

Comments
 (0)