Redo how we do IntegralCasts and implement IntegralToBoolean casts using the already existing cast op.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/AST/Interp/Opcodes.td | ||
---|---|---|
433 | 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. |
clang/lib/AST/Interp/Opcodes.td | ||
---|---|---|
433 | 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; |
clang/lib/AST/Interp/Opcodes.td | ||
---|---|---|
433 | So why not fill them in here as well? |
clang/lib/AST/Interp/Opcodes.td | ||
---|---|---|
433 | I think I can add Uint32 as well, but for the others I can't write tests yet since I don't have their literals implemented yet. |
clang/lib/AST/Interp/Opcodes.td | ||
---|---|---|
433 | Got it, thanks! |
This should work for floating_point as well.