aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/DebugInfo/LogicalView/CodeViewReaderTest.cpp
diff options
context:
space:
mode:
authorJoseph Huber <huberjn@outlook.com>2023-12-13 20:39:50 -0600
committerGitHub <noreply@github.com>2023-12-13 20:39:50 -0600
commitedc83886d479e110c87d104e7241ce67ee1b6316 (patch)
treece15637d5de410009c79867441d3c1c8b86d50d3 /llvm/unittests/DebugInfo/LogicalView/CodeViewReaderTest.cpp
parent1f3d13c415a2a92e5a3811740ed55c4bcff3f539 (diff)
downloadllvm-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