[llvm] fca76b7 - Roll variables into an LLVM_DEBUG block to address -Wunused-but-set-variable
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Tue May 26 12:05:19 PDT 2020
Author: David Blaikie
Date: 2020-05-26T12:05:08-07:00
New Revision: fca76b79456c916fd2ce193ef76d6e795bd9c105
URL: https://github.com/llvm/llvm-project/commit/fca76b79456c916fd2ce193ef76d6e795bd9c105
DIFF: https://github.com/llvm/llvm-project/commit/fca76b79456c916fd2ce193ef76d6e795bd9c105.diff
LOG: Roll variables into an LLVM_DEBUG block to address -Wunused-but-set-variable
Added:
Modified:
llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp b/llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
index cc7a7e2ca9cc..ee219724ee46 100644
--- a/llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
+++ b/llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
@@ -83,8 +83,6 @@ class ELFLinkGraphBuilder_x86_64 {
for (auto SymRef : *Symbols) {
Optional<StringRef> Name;
- unsigned char Binding;
- uint64_t Value;
uint64_t Size = 0;
// FIXME: Read size.
@@ -95,17 +93,15 @@ class ELFLinkGraphBuilder_x86_64 {
} else {
return NameOrErr.takeError();
}
- Binding = SymRef.getBinding();
- Value = SymRef.getValue();
LLVM_DEBUG({
dbgs() << " ";
if (!Name)
dbgs() << "<anonymous symbol>";
else
dbgs() << *Name;
- dbgs() << ": value = " << formatv("{0:x16}", Value)
+ dbgs() << ": value = " << formatv("{0:x16}", SymRef.getValue())
<< ", type = " << formatv("{0:x2}", SymRef.getType())
- << ", binding = " << Binding
+ << ", binding = " << SymRef.getBinding()
<< ", size =" << Size;
dbgs() << "\n";
});
More information about the llvm-commits
mailing list