]> granicus.if.org Git - llvm/commitdiff
Fix "enumeral and non-enumeral type in conditional expression" warnings. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 4 Sep 2019 12:51:40 +0000 (12:51 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 4 Sep 2019 12:51:40 +0000 (12:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370892 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-objcopy/CopyConfig.cpp
tools/llvm-objcopy/ELF/ELFObjcopy.cpp

index 9591e5aeb77e50c01f98e2af939dad8e9de42234..b3a62a3a6d5e7b3f23be5287a04bec2a69e3ef42 100644 (file)
@@ -716,7 +716,7 @@ Expected<DriverConfig> parseObjcopyOptions(ArrayRef<const char *> ArgsArr) {
   for (auto Arg : InputArgs.filtered(OBJCOPY_add_symbol)) {
     Expected<NewSymbolInfo> NSI = parseNewSymbolInfo(
         Arg->getValue(),
-        Config.NewSymbolVisibility.getValueOr(ELF::STV_DEFAULT));
+        Config.NewSymbolVisibility.getValueOr((uint8_t)ELF::STV_DEFAULT));
     if (!NSI)
       return NSI.takeError();
     Config.SymbolsToAdd.push_back(*NSI);
index fa79b6093815762f4aa7b9fc43531770eb5724a7..bd49426f9d1cdeb5348855e6ab93afbddf5877e8 100644 (file)
@@ -756,7 +756,7 @@ Error executeObjcopyOnIHex(const CopyConfig &Config, MemoryBuffer &In,
 Error executeObjcopyOnRawBinary(const CopyConfig &Config, MemoryBuffer &In,
                                 Buffer &Out) {
   uint8_t NewSymbolVisibility =
-      Config.NewSymbolVisibility.getValueOr(ELF::STV_DEFAULT);
+      Config.NewSymbolVisibility.getValueOr((uint8_t)ELF::STV_DEFAULT);
   BinaryReader Reader(Config.BinaryArch, &In, NewSymbolVisibility);
   std::unique_ptr<Object> Obj = Reader.create();