[llvm] 639e1fa - [IntervalMap] Fix -Wdeprecated-anon-enum-enum-conversion due to InstrProf.h

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 7 15:48:20 PST 2024


Author: Fangrui Song
Date: 2024-12-07T15:48:15-08:00
New Revision: 639e1fa255206c1e82246b49afbd8c1e44a22c11

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

LOG: [IntervalMap] Fix -Wdeprecated-anon-enum-enum-conversion due to InstrProf.h

Added: 
    

Modified: 
    llvm/include/llvm/ADT/IntervalMap.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/IntervalMap.h b/llvm/include/llvm/ADT/IntervalMap.h
index 99bf3087722337..6b21e6c6d75a8d 100644
--- a/llvm/include/llvm/ADT/IntervalMap.h
+++ b/llvm/include/llvm/ADT/IntervalMap.h
@@ -222,7 +222,7 @@ using IdxPair = std::pair<unsigned,unsigned>;
 template <typename T1, typename T2, unsigned N>
 class NodeBase {
 public:
-  enum { Capacity = N };
+  static constexpr unsigned Capacity = N;
 
   T1 first[N];
   T2 second[N];


        


More information about the llvm-commits mailing list