Skip to content

Commit 43ab602

Browse files
committed
Use static constants for builtin variables.
1 parent f684e19 commit 43ab602

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@ using namespace lldb;
3434
using namespace lldb_private;
3535

3636
static ConstString g_this = ConstString("this");
37+
// Artificial coroutine-related variables emitted by clang.
38+
static ConstString g_promise = ConstString("__promise");
39+
static ConstString g_coro_frame = ConstString("__coro_frame");
3740

3841
char CPPLanguageRuntime::ID = 0;
3942

4043
CPPLanguageRuntime::CPPLanguageRuntime(Process *process)
4144
: LanguageRuntime(process) {}
4245

4346
bool CPPLanguageRuntime::IsAllowedRuntimeValue(ConstString name) {
44-
return name == g_this ||
45-
// Artificial coroutine-related variables emitted by clang.
46-
name == ConstString("__promise") ||
47-
name == ConstString("__coro_frame");
47+
return name == g_this || name == g_promise || name == g_coro_frame;
4848
}
4949

5050
bool CPPLanguageRuntime::GetObjectDescription(Stream &str,

0 commit comments

Comments
 (0)