[lld][MachO] Silence "enumeral and non-enumeral type" warning from gcc
authorMikael Holmen <mikael.holmen@ericsson.com>
Wed, 3 Mar 2021 09:17:42 +0000 (10:17 +0100)
committerMikael Holmen <mikael.holmen@ericsson.com>
Wed, 3 Mar 2021 09:39:35 +0000 (10:39 +0100)
commit85b67d5fa92dceac2861c64ffedc02eb114f839d
treefff3e898f1a236d24a01d76ce517c180810cb9a4
parent3b47bd32f9df4a57db98db5f35e680c7bd9fde3e
[lld][MachO] Silence "enumeral and non-enumeral type" warning from gcc

gcc complained with

[1110/1140] Building CXX object tools/lld/MachO/CMakeFiles/lldMachO2.dir/SyntheticSections.cpp.o
../../lld/MachO/SyntheticSections.cpp: In function 'int16_t ordinalForDylibSymbol(const lld::macho::DylibSymbol&)':
../../lld/MachO/SyntheticSections.cpp:287:14: warning: enumeral and non-enumeral type in conditional expression [-Wextra]
  286 |   return config->namespaceKind == NamespaceKind::flat || dysym.isDynamicLookup()
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  287 |              ? MachO::BIND_SPECIAL_DYLIB_FLAT_LOOKUP
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  288 |              : dysym.getFile()->ordinal;
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~
lld/MachO/SyntheticSections.cpp