[llvm] a40b3e3 - [NFC] Fix unused variable warning.
Nate Voorhies via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 28 17:19:33 PST 2020
Author: Nate Voorhies
Date: 2020-01-28T17:19:23-08:00
New Revision: a40b3e3b61a0603445358eb87b56e24df19e40de
URL: https://github.com/llvm/llvm-project/commit/a40b3e3b61a0603445358eb87b56e24df19e40de
DIFF: https://github.com/llvm/llvm-project/commit/a40b3e3b61a0603445358eb87b56e24df19e40de.diff
LOG: [NFC] Fix unused variable warning.
Reviewers: dschuff
Reviewed By: dschuff
Subscribers: hiraditya, aheejin, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73591
Added:
Modified:
llvm/lib/Object/SymbolSize.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Object/SymbolSize.cpp b/llvm/lib/Object/SymbolSize.cpp
index 137889905705..04257f11d7d1 100644
--- a/llvm/lib/Object/SymbolSize.cpp
+++ b/llvm/lib/Object/SymbolSize.cpp
@@ -28,7 +28,7 @@ int llvm::object::compareAddress(const SymEntry *A, const SymEntry *B) {
static unsigned getSectionID(const ObjectFile &O, SectionRef Sec) {
if (auto *M = dyn_cast<MachOObjectFile>(&O))
return M->getSectionID(Sec);
- if (const auto *M = dyn_cast<WasmObjectFile>(&O))
+ if (isa<WasmObjectFile>(&O))
return Sec.getIndex();
return cast<COFFObjectFile>(O).getSectionID(Sec);
More information about the llvm-commits
mailing list