[llvm] [MergeFunc] Preserve observable function pointer identity (PR #213604)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 10:34:11 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 -- llvm/include/llvm/Transforms/Utils/FunctionComparator.h llvm/lib/Transforms/Utils/FunctionComparator.cpp llvm/unittests/Transforms/Utils/FunctionComparatorTest.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/llvm/include/llvm/Transforms/Utils/FunctionComparator.h b/llvm/include/llvm/Transforms/Utils/FunctionComparator.h
index 0acf1e51d..7b2dcf98e 100644
--- a/llvm/include/llvm/Transforms/Utils/FunctionComparator.h
+++ b/llvm/include/llvm/Transforms/Utils/FunctionComparator.h
@@ -242,9 +242,9 @@ protected:
   ///          then left value is greater.
   ///          In another words, we compare serial numbers, for more details
   ///          see comments for sn_mapL and sn_mapR.
-  LLVM_ABI int cmpValues(
-      const Value *L, const Value *R,
-      ValueComparisonKind Kind = ValueComparisonKind::Normal) const;
+  LLVM_ABI int
+  cmpValues(const Value *L, const Value *R,
+            ValueComparisonKind Kind = ValueComparisonKind::Normal) const;
 
   /// Compare two Instructions for equivalence, similar to
   /// Instruction::isSameOperationAs.

``````````

</details>


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


More information about the llvm-commits mailing list