[llvm] [SPIRV] Fix indirect calls for function pointers (PR #111159)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 4 06:59:25 PDT 2024
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 0e3476605f06abf88b04bc9b4df0ea6bfef86840 3c7c328d5ef29cc91bfdf8566ba659a85df1a35a --extensions h,cpp -- llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp llvm/lib/Target/SPIRV/SPIRVUtils.cpp llvm/lib/Target/SPIRV/SPIRVUtils.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp b/llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp
index 59256e8195..9bce51e071 100644
--- a/llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp
@@ -37,7 +37,8 @@ bool SPIRVCallLowering::lowerReturn(MachineIRBuilder &MIRBuilder,
FunctionLoweringInfo &FLI,
Register SwiftErrorVReg) const {
// Discard the internal service function
- if (FLI.Fn && FLI.Fn->getFnAttribute(SPIRV_BACKEND_SERVICE_FUN_NAME).isValid())
+ if (FLI.Fn &&
+ FLI.Fn->getFnAttribute(SPIRV_BACKEND_SERVICE_FUN_NAME).isValid())
return true;
// Maybe run postponed production of types for function pointers
diff --git a/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp b/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
index 43e70ae203..73db472082 100644
--- a/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
@@ -1834,7 +1834,7 @@ bool SPIRVEmitIntrinsics::runOnModule(Module &M) {
bool SPIRVEmitIntrinsics::processFunctionPointers(Module &M) {
bool IsExt = false;
- SmallVector<Function*> Worklist;
+ SmallVector<Function *> Worklist;
for (auto &F : M) {
if (!IsExt) {
if (!TM->getSubtarget<SPIRVSubtarget>(F).canUseExtension(
``````````
</details>
https://github.com/llvm/llvm-project/pull/111159
More information about the llvm-commits
mailing list