Skip to content

Commit

Permalink
[SandboxIR] Fix -Wunused-variable in SandboxIR.cpp (NFC)
Browse files Browse the repository at this point in the history
/llvm-project/llvm/lib/SandboxIR/SandboxIR.cpp:584:8:
error: unused variable 'Pair' [-Werror,-Wunused-variable]
  auto Pair = LLVMValueToValueMap.insert({VPtr->Val, std::move(VPtr)});
       ^
1 error generated.
  • Loading branch information
DamonFool committed Jul 19, 2024
1 parent b686600 commit b172f4a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion llvm/lib/SandboxIR/SandboxIR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,8 @@ Value *Context::registerValue(std::unique_ptr<Value> &&VPtr) {
assert(VPtr->getSubclassID() != Value::ClassID::User &&
"Can't register a user!");
Value *V = VPtr.get();
auto Pair = LLVMValueToValueMap.insert({VPtr->Val, std::move(VPtr)});
[[maybe_unused]] auto Pair =
LLVMValueToValueMap.insert({VPtr->Val, std::move(VPtr)});
assert(Pair.second && "Already exists!");
return V;
}
Expand Down

0 comments on commit b172f4a

Please sign in to comment.