[lld] r268040 - [ELF] Fixed warning. NFC.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 29 06:32:31 PDT 2016


Author: grimar
Date: Fri Apr 29 08:32:30 2016
New Revision: 268040

URL: http://llvm.org/viewvc/llvm-project?rev=268040&view=rev
Log:
[ELF] Fixed warning. NFC.

SymbolTable.cpp:298:36: warning: enumeral and non-enumeral type in conditional expression [-Wextra]
     Sym->Binding = New->isShared() ? STB_GLOBAL : New->Binding;
                                    ^

Modified:
    lld/trunk/ELF/SymbolTable.cpp

Modified: lld/trunk/ELF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.cpp?rev=268040&r1=268039&r2=268040&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Fri Apr 29 08:32:30 2016
@@ -295,7 +295,7 @@ template <class ELFT> Symbol *SymbolTabl
   if (P.second) {
     Sym = new (Alloc) Symbol;
     Sym->Body = New;
-    Sym->Binding = New->isShared() ? STB_GLOBAL : New->Binding;
+    Sym->Binding = New->isShared() ? (uint8_t)STB_GLOBAL : New->Binding;
     Sym->Visibility = STV_DEFAULT;
     Sym->IsUsedInRegularObj = false;
     Sym->ExportDynamic = false;




More information about the llvm-commits mailing list