[llvm] c909a53 - [KnownBits] Add missing const to a couple of methods

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 24 07:01:46 PST 2023


Author: Jay Foad
Date: 2023-01-24T15:01:39Z
New Revision: c909a53d9d6bf601dcb3a5afd7ed21490c1b1cbf

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

LOG: [KnownBits] Add missing const to a couple of methods

Added: 
    

Modified: 
    llvm/include/llvm/Support/KnownBits.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Support/KnownBits.h b/llvm/include/llvm/Support/KnownBits.h
index f20d3e112b83e..0fb056b254172 100644
--- a/llvm/include/llvm/Support/KnownBits.h
+++ b/llvm/include/llvm/Support/KnownBits.h
@@ -414,11 +414,11 @@ struct KnownBits {
   /// Compute known bits for the absolute value.
   KnownBits abs(bool IntMinIsPoison = false) const;
 
-  KnownBits byteSwap() {
+  KnownBits byteSwap() const {
     return KnownBits(Zero.byteSwap(), One.byteSwap());
   }
 
-  KnownBits reverseBits() {
+  KnownBits reverseBits() const {
     return KnownBits(Zero.reverseBits(), One.reverseBits());
   }
 


        


More information about the llvm-commits mailing list