Marking TypeSize getFixedSize() and getKnownMinSize() deprecated
authorGuillaume Chatelet <gchatelet@google.com>
Wed, 11 Jan 2023 17:02:32 +0000 (17:02 +0000)
committerGuillaume Chatelet <gchatelet@google.com>
Thu, 12 Jan 2023 09:24:18 +0000 (09:24 +0000)
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.

llvm/include/llvm/Support/TypeSize.h

index 53c888e..0abd4b3 100644 (file)
@@ -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 @@ public:
     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