[llvm] 1dcaa2b - Marking TypeSize getFixedSize() and getKnownMinSize() deprecated

Guillaume Chatelet via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 01:24:29 PST 2023


Author: Guillaume Chatelet
Date: 2023-01-12T09:24:18Z
New Revision: 1dcaa2bdf2300ad5bd28dcdf1b46a68ad1a95f5d

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

LOG: Marking TypeSize getFixedSize() and getKnownMinSize() deprecated

This change is the last of a series to implement the discussion from
https://reviews.llvm.org/D141134 to only keep one version of the functions.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Support/TypeSize.h b/llvm/include/llvm/Support/TypeSize.h
index 53c888e0a2e9..0abd4b3db4ca 100644
--- a/llvm/include/llvm/Support/TypeSize.h
+++ b/llvm/include/llvm/Support/TypeSize.h
@@ -16,6 +16,7 @@
 #define LLVM_SUPPORT_TYPESIZE_H
 
 #include "llvm/ADT/ArrayRef.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/raw_ostream.h"
 
@@ -334,7 +335,10 @@ class TypeSize : public details::FixedOrScalableQuantity<TypeSize, uint64_t> {
     return TypeSize(MinimumSize, true);
   }
 
+  LLVM_DEPRECATED("Use getFixedValue() instead", "getFixedValue")
   constexpr ScalarTy getFixedSize() const { return getFixedValue(); }
+  
+  LLVM_DEPRECATED("Use getKnownMinValue() instead", "getKnownMinValue")
   constexpr ScalarTy getKnownMinSize() const { return getKnownMinValue(); }
 
   // All code for this class below this point is needed because of the


        


More information about the llvm-commits mailing list