[clang] [clang][CIR][mlir] Migrate to free create functions. NFC. (PR #164656)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 22 09:44:27 PDT 2025
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 origin/main HEAD --extensions cpp -- clang/lib/CIR/CodeGen/CIRGenAsm.cpp clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp clang/lib/CIR/CodeGen/CIRGenCXX.cpp clang/lib/CIR/CodeGen/CIRGenClass.cpp clang/lib/CIR/CodeGen/CIRGenExpr.cpp clang/lib/CIR/CodeGen/CIRGenExprComplex.cpp clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp clang/lib/CIR/CodeGen/CIRGenFunction.cpp clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp clang/lib/CIR/CodeGen/CIRGenModule.cpp clang/lib/CIR/CodeGen/CIRGenOpenACC.cpp clang/lib/CIR/CodeGen/CIRGenOpenACCClause.cpp clang/lib/CIR/CodeGen/CIRGenStmt.cpp clang/lib/CIR/CodeGen/CIRGenStmtOpenACC.cpp clang/lib/CIR/CodeGen/CIRGenStmtOpenACCLoop.cpp clang/lib/CIR/Dialect/IR/CIRDialect.cpp clang/lib/CIR/Dialect/IR/CIRMemorySlot.cpp clang/lib/CIR/Dialect/Transforms/FlattenCFG.cpp clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp clang/lib/CIR/Dialect/Transforms/LoweringPrepareItaniumCXXABI.cpp clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp clang/lib/CIR/Lowering/LoweringHelpers.cpp clang/unittests/CIR/PointerLikeTest.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp b/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
index 55f3997f8..32cdd9c1d 100644
--- a/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+++ b/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
@@ -3403,14 +3403,14 @@ mlir::LogicalResult CIRToLLVMComplexSubOpLowering::matchAndRewrite(
auto complexType = mlir::cast<cir::ComplexType>(op.getLhs().getType());
mlir::Type complexElemTy =
getTypeConverter()->convertType(complexType.getElementType());
- auto lhsReal =
- mlir::LLVM::ExtractValueOp::create(rewriter, loc, complexElemTy, lhs, ArrayRef(int64_t{0}));
- auto lhsImag =
- mlir::LLVM::ExtractValueOp::create(rewriter, loc, complexElemTy, lhs, ArrayRef(int64_t{1}));
- auto rhsReal =
- mlir::LLVM::ExtractValueOp::create(rewriter, loc, complexElemTy, rhs, ArrayRef(int64_t{0}));
- auto rhsImag =
- mlir::LLVM::ExtractValueOp::create(rewriter, loc, complexElemTy, rhs, ArrayRef(int64_t{1}));
+ auto lhsReal = mlir::LLVM::ExtractValueOp::create(
+ rewriter, loc, complexElemTy, lhs, ArrayRef(int64_t{0}));
+ auto lhsImag = mlir::LLVM::ExtractValueOp::create(
+ rewriter, loc, complexElemTy, lhs, ArrayRef(int64_t{1}));
+ auto rhsReal = mlir::LLVM::ExtractValueOp::create(
+ rewriter, loc, complexElemTy, rhs, ArrayRef(int64_t{0}));
+ auto rhsImag = mlir::LLVM::ExtractValueOp::create(
+ rewriter, loc, complexElemTy, rhs, ArrayRef(int64_t{1}));
mlir::Value newReal;
mlir::Value newImag;
``````````
</details>
https://github.com/llvm/llvm-project/pull/164656
More information about the cfe-commits
mailing list