[lld] 21fd875 - [lld/mac] Fix warning about unused variable [NFC]
Mikael Holmen via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 8 00:55:13 PDT 2021
Author: Mikael Holmen
Date: 2021-07-08T09:46:30+02:00
New Revision: 21fd8759529707b0f4430ebe8f27a01edc7f655e
URL: https://github.com/llvm/llvm-project/commit/21fd8759529707b0f4430ebe8f27a01edc7f655e
DIFF: https://github.com/llvm/llvm-project/commit/21fd8759529707b0f4430ebe8f27a01edc7f655e.diff
LOG: [lld/mac] Fix warning about unused variable [NFC]
Change "dyn_cast" to "isa" to get rid of the unused
variable "bitcodeFile".
gcc warned with
lld/MachO/Driver.cpp:531:17: warning: unused variable 'bitcodeFile' [-Wunused-variable]
531 | if (auto *bitcodeFile = dyn_cast<BitcodeFile>(file)) {
| ^~~~~~~~~~~
Added:
Modified:
lld/MachO/Driver.cpp
Removed:
################################################################################
diff --git a/lld/MachO/Driver.cpp b/lld/MachO/Driver.cpp
index f886f0e03929c..045ca85dcab31 100644
--- a/lld/MachO/Driver.cpp
+++ b/lld/MachO/Driver.cpp
@@ -528,7 +528,7 @@ static void compileBitcodeFiles() {
// FIXME: Remove this once LTO.cpp honors config->exportDynamic.
if (config->exportDynamic)
for (InputFile *file : inputFiles)
- if (auto *bitcodeFile = dyn_cast<BitcodeFile>(file)) {
+ if (isa<BitcodeFile>(file)) {
warn("the effect of -export_dynamic on LTO is not yet implemented");
break;
}
More information about the llvm-commits
mailing list