Skip to content

Commit 3ae27fc

Browse files
committed
[MC][ELF] Fix gcc "enumeral and non-enumeral type in conditional expression" warning (NFC)
GCC warning: ``` /llvm-project/llvm/lib/MC/ELFObjectWriter.cpp: In member function ‘uint64_t {anonymous}::ELFWriter::writeObject(llvm::MCAssembler&, const llvm::MCAsmLayout&)’: /llvm-project/llvm/lib/MC/ELFObjectWriter.cpp:1137:38: warning: enumeral and non-enumeral type in conditional expression [-Wextra] 1137 | write(uint32_t(Group->isComdat() ? ELF::GRP_COMDAT : 0)); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ ```
1 parent 3d10ec0 commit 3ae27fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/MC/ELFObjectWriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@ uint64_t ELFWriter::writeObject(MCAssembler &Asm, const MCAsmLayout &Layout) {
11341134

11351135
const MCSymbol *SignatureSymbol = Group->getGroup();
11361136
assert(SignatureSymbol);
1137-
write(uint32_t(Group->isComdat() ? ELF::GRP_COMDAT : 0));
1137+
write(uint32_t(Group->isComdat() ? unsigned(ELF::GRP_COMDAT) : 0));
11381138
for (const MCSectionELF *Member : GroupMembers[SignatureSymbol]) {
11391139
uint32_t SecIndex = SectionIndexMap.lookup(Member);
11401140
write(SecIndex);

0 commit comments

Comments
 (0)