aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/ObjectFile.cpp
diff options
context:
space:
mode:
authorJoseph Huber <jhuber6@vols.utk.edu>2022-03-03 14:56:13 -0500
committerJoseph Huber <jhuber6@vols.utk.edu>2022-03-14 20:08:31 -0400
commit24ebdb6c255e0168e4518cc7f0c465b53867abf8 (patch)
treec65bd838f7c9995e101de57aae02a19527c59bee /llvm/lib/Object/ObjectFile.cpp
parent23d885b3a2e8a1e0c22cfcbccec410865e7653c9 (diff)
downloadllvm-24ebdb6c255e0168e4518cc7f0c465b53867abf8.zip
llvm-24ebdb6c255e0168e4518cc7f0c465b53867abf8.tar.gz
llvm-24ebdb6c255e0168e4518cc7f0c465b53867abf8.tar.bz2
[CUDA] Add CUDA fatbinary magic
Nvidia uses fatbinaries to bundle all of their device code. This patch adds the magic number "0x50ed55ba" used in their propeitary format to the list of magic identifies. This is technically undocumented and could unlikely be changed by Nvidia in the future. Reviewed By: tra Differential Revision: https://reviews.llvm.org/D120932
Diffstat (limited to 'llvm/lib/Object/ObjectFile.cpp')
-rw-r--r--llvm/lib/Object/ObjectFile.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Object/ObjectFile.cpp b/llvm/lib/Object/ObjectFile.cpp
index fedf737..2e3c2ed 100644
--- a/llvm/lib/Object/ObjectFile.cpp
+++ b/llvm/lib/Object/ObjectFile.cpp
@@ -146,6 +146,7 @@ ObjectFile::createObjectFile(MemoryBufferRef Object, file_magic Type,
case file_magic::pdb:
case file_magic::minidump:
case file_magic::goff_object:
+ case file_magic::cuda_fatbinary:
return errorCodeToError(object_error::invalid_file_type);
case file_magic::tapi_file:
return errorCodeToError(object_error::invalid_file_type);