llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Aditya Chaudhari (AdityaC4)

<details>
<summary>Changes</summary>

fixes: #<!-- -->161685

---
Full diff: https://github.com/llvm/llvm-project/pull/161755.diff


1 Files Affected:

- (modified) clang/lib/AST/ByteCode/PrimType.h (+19) 


``````````diff
diff --git a/clang/lib/AST/ByteCode/PrimType.h 
b/clang/lib/AST/ByteCode/PrimType.h
index 54fd39ac6fcc8..e1c2bf58a75e6 100644
--- a/clang/lib/AST/ByteCode/PrimType.h
+++ b/clang/lib/AST/ByteCode/PrimType.h
@@ -262,6 +262,25 @@ static inline bool aligned(const void *P) {
     }                                                                          
\
   } while (0)
 
+#define NUMERIC_TYPE_SWITCH(Expr, B)                                           
\
+  do {                                                                         
\
+    switch (Expr) {                                                            
\
+      TYPE_SWITCH_CASE(PT_Sint8, B)                                            
\
+      TYPE_SWITCH_CASE(PT_Uint8, B)                                            
\
+      TYPE_SWITCH_CASE(PT_Sint16, B)                                           
\
+      TYPE_SWITCH_CASE(PT_Uint16, B)                                           
\
+      TYPE_SWITCH_CASE(PT_Sint32, B)                                           
\
+      TYPE_SWITCH_CASE(PT_Uint32, B)                                           
\
+      TYPE_SWITCH_CASE(PT_Sint64, B)                                           
\
+      TYPE_SWITCH_CASE(PT_Uint64, B)                                           
\
+      TYPE_SWITCH_CASE(PT_IntAP, B)                                            
\
+      TYPE_SWITCH_CASE(PT_IntAPS, B)                                           
\
+      TYPE_SWITCH_CASE(PT_Float, B)                                            
\
+    default:                                                                   
\
+      llvm_unreachable("Not an integer or floating point value");              
\
+    }                                                                          
\
+  } while (0)
+
 #define TYPE_SWITCH_ALLOC(Expr, B)                                             
\
   do {                                                                         
\
     switch (Expr) {                                                            
\

``````````

</details>


https://github.com/llvm/llvm-project/pull/161755
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to