[llvm] 19fb52c - [NFC] Add missing switch cases

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Mon May 2 16:13:31 PDT 2022


Author: Chris Bieneman
Date: 2022-05-02T18:13:07-05:00
New Revision: 19fb52cbfec7fcb013b9354df4d069a03a7cd3f6

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

LOG: [NFC] Add missing switch cases

This silences warnings encountered on some bots.

Added: 
    

Modified: 
    llvm/lib/Object/Binary.cpp
    llvm/lib/Object/ObjectFile.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Object/Binary.cpp b/llvm/lib/Object/Binary.cpp
index 67ed44a1cf143..1703f76cf318f 100644
--- a/llvm/lib/Object/Binary.cpp
+++ b/llvm/lib/Object/Binary.cpp
@@ -84,6 +84,7 @@ Expected<std::unique_ptr<Binary>> object::createBinary(MemoryBufferRef Buffer,
   case file_magic::unknown:
   case file_magic::cuda_fatbinary:
   case file_magic::coff_cl_gl_object:
+  case file_magic::dxcontainer_object:
     // Unrecognized object file format.
     return errorCodeToError(object_error::invalid_file_type);
   case file_magic::minidump:

diff  --git a/llvm/lib/Object/ObjectFile.cpp b/llvm/lib/Object/ObjectFile.cpp
index fed6726467422..609dfae25929e 100644
--- a/llvm/lib/Object/ObjectFile.cpp
+++ b/llvm/lib/Object/ObjectFile.cpp
@@ -147,6 +147,7 @@ ObjectFile::createObjectFile(MemoryBufferRef Object, file_magic Type,
   case file_magic::minidump:
   case file_magic::goff_object:
   case file_magic::cuda_fatbinary:
+  case file_magic::dxcontainer_object:
     return errorCodeToError(object_error::invalid_file_type);
   case file_magic::tapi_file:
     return errorCodeToError(object_error::invalid_file_type);


        


More information about the llvm-commits mailing list