Skip to content

Commit f719a33

Browse files
committed
Mark assert-used-only variable as [[maybe_unused]]
Seemed nicer than inlining, given the complexities of flag checking and the multiple uses.
1 parent f729c09 commit f719a33

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/ExecutionEngine/Orc/Core.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,8 @@ Error JITDylib::resolve(MaterializationResponsibility &MR,
933933
SymbolsInErrorState.insert(KV.first);
934934
else {
935935
if (SymI->second.getFlags() & JITSymbolFlags::Common) {
936-
auto WeakOrCommon = JITSymbolFlags::Weak | JITSymbolFlags::Common;
936+
[[maybe_unused]] auto WeakOrCommon =
937+
JITSymbolFlags::Weak | JITSymbolFlags::Common;
937938
assert((KV.second.getFlags() & WeakOrCommon) &&
938939
"Common symbols must be resolved as common or weak");
939940
assert((KV.second.getFlags() & ~WeakOrCommon) ==

0 commit comments

Comments
 (0)