Skip to content

Commit 796feb6

Browse files
committed
[MC][ELF] Fix unused variable warning (NFC)
GCC warning: ``` /llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp: In member function ‘virtual llvm::MCSection* llvm::TargetLoweringObjectFileELF::getSectionForLSDA(const llvm::Function&, const llvm::MCSymbol&, const llvm::TargetMachine&) const’: /llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:871:8: warning: variable ‘IsComdat’ set but not used [-Wunused-but-set-variable] 871 | bool IsComdat = false; | ^~~~~~~~ ```
1 parent 3afc816 commit 796feb6

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -868,11 +868,9 @@ MCSection *TargetLoweringObjectFileELF::getSectionForLSDA(
868868
unsigned Flags = LSDA->getFlags();
869869
const MCSymbolELF *LinkedToSym = nullptr;
870870
StringRef Group;
871-
bool IsComdat = false;
872871
if (const Comdat *C = getELFComdat(&F)) {
873872
Flags |= ELF::SHF_GROUP;
874873
Group = C->getName();
875-
IsComdat = C->getSelectionKind() == Comdat::Any;
876874
}
877875
// Use SHF_LINK_ORDER to facilitate --gc-sections if we can use GNU ld>=2.36
878876
// or LLD, which support mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER.

0 commit comments

Comments
 (0)