[llvm] Refactored llvm::UpgradeIntrinsicCall() function in lib/IR/AutoUpgrade.cpp with lookup table based on #30382 (PR #128611)

via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 24 16:54:21 PST 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 49c31201278ae5949694ed78b69ffbbca6a1826a c7477ed69b74dd1212697d9414b6de4846a1ea4d --extensions cpp -- llvm/lib/IR/AutoUpgrade.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp
index 06db5c024f..0304f644c2 100644
--- a/llvm/lib/IR/AutoUpgrade.cpp
+++ b/llvm/lib/IR/AutoUpgrade.cpp
@@ -4375,13 +4375,13 @@ void llvm::UpgradeIntrinsicCall(CallBase *CI, Function *NewFn) {
         not_consumed = false;
         if (entry.first == prefix_x86 || Name != "stackprotectorcheck") {
           if (entry.first == prefix_dbg) {
-            // We might have decided we don't want the new format after all between
-            // first requesting the upgrade and now; skip the conversion if that is
-            // the case, and check here to see if the intrinsic needs to be upgraded
-            // normally.
+            // We might have decided we don't want the new format after all
+            // between first requesting the upgrade and now; skip the conversion
+            // if that is the case, and check here to see if the intrinsic needs
+            // to be upgraded normally.
             if (!CI->getModule()->IsNewDbgInfoFormat) {
-              bool NeedsUpgrade =
-                  upgradeIntrinsicFunction1(CI->getCalledFunction(), NewFn, false);
+              bool NeedsUpgrade = upgradeIntrinsicFunction1(
+                  CI->getCalledFunction(), NewFn, false);
               if (!NeedsUpgrade)
                 return;
               FallthroughToDefaultUpgrade = true;

``````````

</details>


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


More information about the llvm-commits mailing list