[llvm] ca9c048 - [ARM] Silence "enumerated and non-enumerated type in conditional expression" warning. NFC

David Green via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 8 11:32:19 PST 2025


Author: David Green
Date: 2025-02-08T19:32:14Z
New Revision: ca9c0486cccba08dc6a3489176cbd7f38bad8e63

URL: https://github.com/llvm/llvm-project/commit/ca9c0486cccba08dc6a3489176cbd7f38bad8e63
DIFF: https://github.com/llvm/llvm-project/commit/ca9c0486cccba08dc6a3489176cbd7f38bad8e63.diff

LOG: [ARM] Silence "enumerated and non-enumerated type in conditional expression" warning. NFC

Fixes #125543

Added: 
    

Modified: 
    llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp b/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
index 6e2886a1929230..dfaad24e1b8776 100644
--- a/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
+++ b/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
@@ -1395,7 +1395,7 @@ static MCAsmBackend *createARMAsmBackend(const Target &T,
   case Triple::ELF:
     assert(TheTriple.isOSBinFormatELF() && "using ELF for non-ELF target");
     uint8_t OSABI = Options.FDPIC
-                        ? ELF::ELFOSABI_ARM_FDPIC
+                        ? static_cast<uint8_t>(ELF::ELFOSABI_ARM_FDPIC)
                         : MCELFObjectTargetWriter::getOSABI(TheTriple.getOS());
     return new ARMAsmBackendELF(T, STI.getTargetTriple().isThumb(), OSABI,
                                 Endian);


        


More information about the llvm-commits mailing list