[llvm] [TableGen] Refactor Intrinsic handling in TableGen (PR #103980)

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 14 07:06:32 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 9487cf97e31bb9fac14394913b64c60ae60f5e41 ea243a68f33028a82cbe20e68b1e82019f9f646c --extensions cpp,h -- llvm/include/llvm/ADT/STLExtras.h llvm/lib/Object/COFFImportFile.cpp llvm/utils/TableGen/Basic/CodeGenIntrinsics.cpp llvm/utils/TableGen/Basic/CodeGenIntrinsics.h llvm/utils/TableGen/Basic/SDNodeProperties.cpp llvm/utils/TableGen/Basic/SDNodeProperties.h llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.cpp llvm/utils/TableGen/Common/GlobalISel/PatternParser.cpp llvm/utils/TableGen/IntrinsicEmitter.cpp llvm/utils/TableGen/SearchableTableEmitter.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/utils/TableGen/IntrinsicEmitter.cpp b/llvm/utils/TableGen/IntrinsicEmitter.cpp
index 4d065a349b..d1abe35508 100644
--- a/llvm/utils/TableGen/IntrinsicEmitter.cpp
+++ b/llvm/utils/TableGen/IntrinsicEmitter.cpp
@@ -347,7 +347,7 @@ void IntrinsicEmitter::EmitGenerator(const CodeGenIntrinsicTable &Ints,
 static bool compareFnAttributes(const CodeGenIntrinsic *L,
                                 const CodeGenIntrinsic *R, bool Default) {
   // Sort throwing intrinsics after non-throwing intrinsics.
-  auto TieBoolAttributes = [](const CodeGenIntrinsic *I) -> auto{
+  auto TieBoolAttributes = [](const CodeGenIntrinsic *I) -> auto {
     return std::tie(I->canThrow, I->isNoDuplicate, I->isNoMerge, I->isNoReturn,
                     I->isNoCallback, I->isNoSync, I->isNoFree, I->isWillReturn,
                     I->isCold, I->isConvergent, I->isSpeculatable,

``````````

</details>


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


More information about the llvm-commits mailing list