[lld] r247330 - Fix a warning when building with gcc.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 13:02:22 PDT 2015


Author: rafael
Date: Thu Sep 10 15:02:22 2015
New Revision: 247330

URL: http://llvm.org/viewvc/llvm-project?rev=247330&view=rev
Log:
Fix a warning when building with gcc.

It was

/Writer.cpp:119:45: warning: enumeral and non-enumeral type in conditional expression

Modified:
    lld/trunk/ELF/Writer.cpp

Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=247330&r1=247329&r2=247330&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Thu Sep 10 15:02:22 2015
@@ -116,7 +116,7 @@ public:
   typedef typename OutputSectionBase<Is64Bits>::uintX_t uintX_t;
   StringTableSection(bool Dynamic)
       : OutputSectionBase<Is64Bits>(Dynamic ? ".dynstr" : ".strtab", SHT_STRTAB,
-                                    Dynamic ? SHF_ALLOC : 0) {
+                                    Dynamic ? (uintX_t)SHF_ALLOC : 0) {
     this->Header.sh_addralign = 1;
   }
 




More information about the llvm-commits mailing list