mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2026-07-18 13:15:38 -04:00
[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;
| ^~~~~~~~
```
This commit is contained in:
@@ -868,11 +868,9 @@ MCSection *TargetLoweringObjectFileELF::getSectionForLSDA(
|
||||
unsigned Flags = LSDA->getFlags();
|
||||
const MCSymbolELF *LinkedToSym = nullptr;
|
||||
StringRef Group;
|
||||
bool IsComdat = false;
|
||||
if (const Comdat *C = getELFComdat(&F)) {
|
||||
Flags |= ELF::SHF_GROUP;
|
||||
Group = C->getName();
|
||||
IsComdat = C->getSelectionKind() == Comdat::Any;
|
||||
}
|
||||
// Use SHF_LINK_ORDER to facilitate --gc-sections if we can use GNU ld>=2.36
|
||||
// or LLD, which support mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER.
|
||||
|
||||
Reference in New Issue
Block a user