mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-12 06:45:16 +00:00
Implement bitwise complement operator
This translates to/from OpNot for SPIR-V, and ~ for all three textual language backends. Fixed: tint:866 Change-Id: Id934fb309221e3fca0e7efa33edaaae137fd8085 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54980 Auto-Submit: James Price <jrprice@google.com> Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
52b6a004b8
commit
c932b5535f
@@ -23,6 +23,10 @@ std::ostream& operator<<(std::ostream& out, UnaryOp mod) {
|
||||
out << "address-of";
|
||||
break;
|
||||
}
|
||||
case UnaryOp::kComplement: {
|
||||
out << "complement";
|
||||
break;
|
||||
}
|
||||
case UnaryOp::kIndirection: {
|
||||
out << "indirection";
|
||||
break;
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace ast {
|
||||
/// The unary op
|
||||
enum class UnaryOp {
|
||||
kAddressOf, // &EXPR
|
||||
kComplement, // ~EXPR
|
||||
kIndirection, // *EXPR
|
||||
kNegation, // -EXPR
|
||||
kNot, // !EXPR
|
||||
|
||||
Reference in New Issue
Block a user