Skip to content

Commit 9b97177

Browse files
committed
Fix compile errors in no-asserts configuration
1 parent 7ddff01 commit 9b97177

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2124,7 +2124,9 @@ template <typename T> bool Equivalent(std::optional<T> l, T r) {
21242124
} // namespace
21252125
#endif
21262126

2127+
#ifndef NDEBUG
21272128
constexpr ExecutionContextScope *g_no_exe_ctx = nullptr;
2129+
#endif
21282130

21292131
// This can be removed once the transition is complete.
21302132
#define FALLBACK(REFERENCE, ARGS, DEFAULT) \
@@ -2222,11 +2224,15 @@ constexpr ExecutionContextScope *g_no_exe_ctx = nullptr;
22222224

22232225
#else
22242226
#define VALIDATE_AND_RETURN_STATIC(IMPL, REFERENCE) \
2225-
FALLBACK(REFERENCE, ()); \
2227+
FALLBACK(REFERENCE, (), {}); \
22262228
return IMPL()
22272229
#define VALIDATE_AND_RETURN(IMPL, REFERENCE, TYPE, EXE_CTX, ARGS, \
22282230
FALLBACK_ARGS) \
2229-
FALLBACK(REFERENCE, FALLBACK_ARGS); \
2231+
FALLBACK(REFERENCE, FALLBACK_ARGS, {}); \
2232+
return IMPL();
2233+
#define VALIDATE_AND_RETURN_EXPECTED(IMPL, REFERENCE, TYPE, EXE_CTX, ARGS, \
2234+
FALLBACK_ARGS, DEFAULT) \
2235+
FALLBACK(REFERENCE, FALLBACK_ARGS, DEFAULT); \
22302236
return IMPL();
22312237
#endif
22322238

0 commit comments

Comments
 (0)