[clang] [llvm] [LLVM] Add file magic detection for SPIR-V files. (PR #75363)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 13 12:26:25 PST 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 142e567cf00815f7d1b3d72aaf298212a3f83ab2 758de880dbd853c37a1e9abb72a1cb0624c4247d -- clang/tools/clang-offload-packager/ClangOffloadPackager.cpp llvm/include/llvm/BinaryFormat/Magic.h llvm/lib/BinaryFormat/Magic.cpp llvm/lib/Object/Binary.cpp llvm/lib/Object/ObjectFile.cpp llvm/unittests/BinaryFormat/TestFileMagic.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/tools/clang-offload-packager/ClangOffloadPackager.cpp b/clang/tools/clang-offload-packager/ClangOffloadPackager.cpp
index 87e491e057..f00b71b692 100644
--- a/clang/tools/clang-offload-packager/ClangOffloadPackager.cpp
+++ b/clang/tools/clang-offload-packager/ClangOffloadPackager.cpp
@@ -234,7 +234,7 @@ int main(int argc, const char **argv) {
return EXIT_SUCCESS;
}
- const char spirv_object_le[] = "\x03\x02\x23\x07";
+ const char spirv_object_le[] = "\x03\x02\x23\x07";
StringRef str(spirv_object_le, sizeof(spirv_object_le));
llvm::errs() << str.size() << "\n";
``````````
</details>
https://github.com/llvm/llvm-project/pull/75363
More information about the llvm-commits
mailing list