diff options
author | Joseph Huber <huberjn@outlook.com> | 2023-12-13 20:39:50 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-13 20:39:50 -0600 |
commit | edc83886d479e110c87d104e7241ce67ee1b6316 (patch) | |
tree | ce15637d5de410009c79867441d3c1c8b86d50d3 /llvm/unittests/DebugInfo/LogicalView/CodeViewReaderTest.cpp | |
parent | 1f3d13c415a2a92e5a3811740ed55c4bcff3f539 (diff) | |
download | llvm-edc83886d479e110c87d104e7241ce67ee1b6316.zip llvm-edc83886d479e110c87d104e7241ce67ee1b6316.tar.gz llvm-edc83886d479e110c87d104e7241ce67ee1b6316.tar.bz2 |
[LLVM] Add file magic detection for SPIR-V files. (#75363)
Summary:
More SPIR-V related patches are being upstreamed. We should add support
to detect when a binary file is SPIR-V. This will be used in the future
when support for SPIR-V is added to the offloading runtime or more
support for bundling.
The magic number is described in the official documentation:
https://registry.khronos.org/SPIR-V/specs/1.0/SPIRV.html#Magic. Notably,
SPIR-V files are streams of 32-bit words. This means that the magic
numbers differ depending on the endianness. Here we simply check the
strandard and byte-reversed versions.
Diffstat (limited to 'llvm/unittests/DebugInfo/LogicalView/CodeViewReaderTest.cpp')
0 files changed, 0 insertions, 0 deletions