[PATCH] D132739: [clang][Interp] Implement IntegralToBoolean casts

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 26 06:46:34 PDT 2022


tbaeder added inline comments.


================
Comment at: clang/lib/AST/Interp/Opcodes.td:433
+def ToCastTypeClass : TypeClass {
+  let Types = [Sint32, Bool];
 }
----------------
erichkeane wrote:
> Not sure how this works... but is this ONLY int-32 to bool and vice versa?  The implementation of any of the other integrals should be trivial.
Yes exactly, the primitive types are:
```
def Bool : Type;
def Sint8 : Type;
def Uint8 : Type;
def Sint16 : Type;
def Uint16 : Type;
def Sint32 : Type;
def Uint32 : Type;
def Sint64 : Type;
def Uint64 : Type;
def Ptr : Type;
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132739/new/

https://reviews.llvm.org/D132739



More information about the cfe-commits mailing list