[llvm] b172f4a - [SandboxIR] Fix -Wunused-variable in SandboxIR.cpp (NFC)
Jie Fu via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 19 16:54:16 PDT 2024
Author: Jie Fu
Date: 2024-07-20T07:54:07+08:00
New Revision: b172f4aabe7918362cbac54e394657c37627238c
URL: https://github.com/llvm/llvm-project/commit/b172f4aabe7918362cbac54e394657c37627238c
DIFF: https://github.com/llvm/llvm-project/commit/b172f4aabe7918362cbac54e394657c37627238c.diff
LOG: [SandboxIR] Fix -Wunused-variable in SandboxIR.cpp (NFC)
/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.
Added:
Modified:
llvm/lib/SandboxIR/SandboxIR.cpp
Removed:
################################################################################
diff --git a/llvm/lib/SandboxIR/SandboxIR.cpp b/llvm/lib/SandboxIR/SandboxIR.cpp
index f392704a6d27e..d49ec0c91e599 100644
--- a/llvm/lib/SandboxIR/SandboxIR.cpp
+++ b/llvm/lib/SandboxIR/SandboxIR.cpp
@@ -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;
}
More information about the llvm-commits
mailing list