[llvm] [IR] Remove FP cast constant expressions (PR #71408)

via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 6 07:49:14 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 1c6102d19b445c6d17d3792dde0fc308efebc875 53f2b2d55ae0c39fd96c04925d644a48b8b3db27 -- llvm/bindings/ocaml/llvm/llvm_ocaml.c llvm/include/llvm-c/Core.h llvm/include/llvm/IR/Constants.h llvm/include/llvm/IR/PatternMatch.h llvm/lib/AsmParser/LLParser.cpp llvm/lib/IR/Constants.cpp llvm/lib/IR/Core.cpp llvm/unittests/IR/ConstantsTest.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h
index ceeb74bd4e6f..02fa4c5b06b7 100644
--- a/llvm/include/llvm-c/Core.h
+++ b/llvm/include/llvm-c/Core.h
@@ -2296,8 +2296,7 @@ LLVMValueRef LLVMConstBitCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType);
 LLVMValueRef LLVMConstAddrSpaceCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType);
 LLVMValueRef LLVMConstTruncOrBitCast(LLVMValueRef ConstantVal,
                                      LLVMTypeRef ToType);
-LLVMValueRef LLVMConstPointerCast(LLVMValueRef ConstantVal,
-                                  LLVMTypeRef ToType);
+LLVMValueRef LLVMConstPointerCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType);
 LLVMValueRef LLVMConstExtractElement(LLVMValueRef VectorConstant,
                                      LLVMValueRef IndexConstant);
 LLVMValueRef LLVMConstInsertElement(LLVMValueRef VectorConstant,
diff --git a/llvm/include/llvm/IR/PatternMatch.h b/llvm/include/llvm/IR/PatternMatch.h
index f709a5ac52a4..8b7bbbad109e 100644
--- a/llvm/include/llvm/IR/PatternMatch.h
+++ b/llvm/include/llvm/IR/PatternMatch.h
@@ -1717,8 +1717,7 @@ inline CastInst_match<OpTy, Instruction::FPToSI> m_FPToSI(const OpTy &Op) {
 }
 
 template <typename OpTy>
-inline CastInst_match<OpTy, Instruction::FPTrunc>
-m_FPTrunc(const OpTy &Op) {
+inline CastInst_match<OpTy, Instruction::FPTrunc> m_FPTrunc(const OpTy &Op) {
   return CastInst_match<OpTy, Instruction::FPTrunc>(Op);
 }
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/71408


More information about the llvm-commits mailing list