[llvm-branch-commits] [clang] [CIR][CIRGen] Introduce ExtraFuncAttr to FuncOp (PR #186331)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Mar 13 00:48:48 PDT 2026
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 h,cpp -- clang/include/clang/CIR/MissingFeatures.h clang/lib/CIR/CodeGen/CIRGenExpr.cpp clang/lib/CIR/CodeGen/CIRGenFunction.cpp clang/lib/CIR/CodeGen/CIRGenModule.cpp clang/lib/CIR/CodeGen/CIRGenModule.h clang/lib/CIR/CodeGen/CIRGenVTables.cpp clang/lib/CIR/Dialect/IR/CIRDialect.cpp clang/lib/CIR/Dialect/Transforms/EHABILowering.cpp clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVMIR.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/CodeGen/CIRGenModule.cpp b/clang/lib/CIR/CodeGen/CIRGenModule.cpp
index ee0f4cf4e..5514257c0 100644
--- a/clang/lib/CIR/CodeGen/CIRGenModule.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenModule.cpp
@@ -2689,11 +2689,10 @@ CIRGenModule::createCIRFunction(mlir::Location loc, StringRef name,
&getMLIRContext(), cir::GlobalLinkageKind::ExternalLinkage));
mlir::SymbolTable::setSymbolVisibility(
func, mlir::SymbolTable::Visibility::Private);
-
+
// Initialize with empty dict of extra attributes.
func.setExtraAttrsAttr(cir::ExtraFuncAttributesAttr::get(
- &getMLIRContext(),
- mlir::DictionaryAttr::get(&getMLIRContext())));
+ &getMLIRContext(), mlir::DictionaryAttr::get(&getMLIRContext())));
// Mark C++ special member functions (Constructor, Destructor etc.)
setCXXSpecialMemberAttr(func, funcDecl);
@@ -2713,7 +2712,6 @@ CIRGenModule::createCIRFunction(mlir::Location loc, StringRef name,
return func;
}
-
cir::FuncOp
CIRGenModule::createCIRBuiltinFunction(mlir::Location loc, StringRef name,
cir::FuncType ty,
diff --git a/clang/lib/CIR/CodeGen/CIRGenModule.h b/clang/lib/CIR/CodeGen/CIRGenModule.h
index 4dbfdcf86..baaf7db20 100644
--- a/clang/lib/CIR/CodeGen/CIRGenModule.h
+++ b/clang/lib/CIR/CodeGen/CIRGenModule.h
@@ -631,7 +631,6 @@ public:
void replaceUsesOfNonProtoTypeWithRealFunction(mlir::Operation *old,
cir::FuncOp newFn);
-
cir::FuncOp
getOrCreateCIRFunction(llvm::StringRef mangledName, mlir::Type funcType,
clang::GlobalDecl gd, bool forVTable,
``````````
</details>
https://github.com/llvm/llvm-project/pull/186331
More information about the llvm-branch-commits
mailing list