mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-24 10:07:48 +00:00
Allow bundle size to be 0 in clang-offload-bundler
HIP uses clang-offload-bundler to create fat binary. The bundle for host is empty. Currently clang-offload-bundler checks if the bundle size is 0 when unbundling. If so it will exit without unbundling the remaining bundles. This causes clang-offload-bundler not being able to unbundle fat binaries generated for HIP. This patch allows bundles size to be 0 when clang-offload-bundler unbundles input files. Differential Revision: https://reviews.llvm.org/D58057 llvm-svn: 355419
This commit is contained in:
parent
1af5bd54a8
commit
071949c3af
@ -292,7 +292,7 @@ public:
|
||||
ReadChars += TripleSize;
|
||||
|
||||
// Check if the offset and size make sense.
|
||||
if (!Size || !Offset || Offset + Size > FC.size())
|
||||
if (!Offset || Offset + Size > FC.size())
|
||||
return;
|
||||
|
||||
assert(BundlesInfo.find(Triple) == BundlesInfo.end() &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user