[clang] b1e329a - [clang][Interp][NFC] Explicitly define PrimType values

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Mon May 27 06:43:36 PDT 2024


Author: Timm Bäder
Date: 2024-05-27T15:43:11+02:00
New Revision: b1e329a3f54fbe55fa61c124f94cc6c8509e5423

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

LOG: [clang][Interp][NFC] Explicitly define PrimType values

So I don't have to count them down all the time.

Added: 
    

Modified: 
    clang/lib/AST/Interp/PrimType.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/Interp/PrimType.h b/clang/lib/AST/Interp/PrimType.h
index 05a094d0c5b1f..604fb5dfde1e4 100644
--- a/clang/lib/AST/Interp/PrimType.h
+++ b/clang/lib/AST/Interp/PrimType.h
@@ -30,20 +30,20 @@ template <unsigned Bits, bool Signed> class Integral;
 
 /// Enumeration of the primitive types of the VM.
 enum PrimType : unsigned {
-  PT_Sint8,
-  PT_Uint8,
-  PT_Sint16,
-  PT_Uint16,
-  PT_Sint32,
-  PT_Uint32,
-  PT_Sint64,
-  PT_Uint64,
-  PT_IntAP,
-  PT_IntAPS,
-  PT_Bool,
-  PT_Float,
-  PT_Ptr,
-  PT_FnPtr,
+  PT_Sint8 = 0,
+  PT_Uint8 = 1,
+  PT_Sint16 = 2,
+  PT_Uint16 = 3,
+  PT_Sint32 = 4,
+  PT_Uint32 = 5,
+  PT_Sint64 = 6,
+  PT_Uint64 = 7,
+  PT_IntAP = 8,
+  PT_IntAPS = 9,
+  PT_Bool = 10,
+  PT_Float = 11,
+  PT_Ptr = 12,
+  PT_FnPtr = 13,
 };
 
 inline constexpr bool isPtrType(PrimType T) {


        


More information about the cfe-commits mailing list