[llvm] e0cbcf9 - [X86] Make the X86FrameSortingComparator operator const. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 31 05:21:25 PDT 2020


Author: Simon Pilgrim
Date: 2020-10-31T12:16:49Z
New Revision: e0cbcf96ce6263d40a85cc088e053af1db233056

URL: https://github.com/llvm/llvm-project/commit/e0cbcf96ce6263d40a85cc088e053af1db233056
DIFF: https://github.com/llvm/llvm-project/commit/e0cbcf96ce6263d40a85cc088e053af1db233056.diff

LOG: [X86] Make the X86FrameSortingComparator operator const. NFCI.

Fixes a cppcheck remark.

Added: 
    

Modified: 
    llvm/lib/Target/X86/X86FrameLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/X86/X86FrameLowering.cpp b/llvm/lib/Target/X86/X86FrameLowering.cpp
index e92384ce6385..05b4c94008ae 100644
--- a/llvm/lib/Target/X86/X86FrameLowering.cpp
+++ b/llvm/lib/Target/X86/X86FrameLowering.cpp
@@ -3362,7 +3362,7 @@ struct X86FrameSortingObject {
 // at the end of our list.
 struct X86FrameSortingComparator {
   inline bool operator()(const X86FrameSortingObject &A,
-                         const X86FrameSortingObject &B) {
+                         const X86FrameSortingObject &B) const {
     uint64_t DensityAScaled, DensityBScaled;
 
     // For consistency in our comparison, all invalid objects are placed


        


More information about the llvm-commits mailing list