Skip to content

Commit c79827c

Browse files
[SandboxIR] Fix a warning
This patch fixes: llvm/lib/SandboxIR/Context.cpp:684:22: error: unused variable 'MaxRegisteredCallbacks' [-Werror,-Wunused-const-variable]
1 parent b9978f8 commit c79827c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/SandboxIR/Context.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ void Context::runMoveInstrCallbacks(Instruction *I, const BBIterator &WhereIt) {
681681
// An arbitrary limit, to check for accidental misuse. We expect a small number
682682
// of callbacks to be registered at a time, but we can increase this number if
683683
// we discover we needed more.
684-
static constexpr int MaxRegisteredCallbacks = 16;
684+
[[maybe_unused]] static constexpr int MaxRegisteredCallbacks = 16;
685685

686686
Context::CallbackID Context::registerEraseInstrCallback(EraseInstrCallback CB) {
687687
assert(EraseInstrCallbacks.size() <= MaxRegisteredCallbacks &&

0 commit comments

Comments
 (0)