[Lldb-commits] [lldb] [LLDB] Display artificial __promise and __coro_frame variables. (PR #71928)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Fri Nov 10 12:54:56 PST 2023


================
@@ -41,7 +41,10 @@ CPPLanguageRuntime::CPPLanguageRuntime(Process *process)
     : LanguageRuntime(process) {}
 
 bool CPPLanguageRuntime::IsAllowedRuntimeValue(ConstString name) {
-  return name == g_this;
+  return name == g_this ||
+         // Artificial coroutine-related variables emitted by clang.
+         name == ConstString("__promise") ||
+         name == ConstString("__coro_frame");
----------------
JDevlieghere wrote:

These should be static constants too, like `g_this`. Otherwise we lose the (little) benefit of these being `ConstStrings`. 

https://github.com/llvm/llvm-project/pull/71928


More information about the lldb-commits mailing list