Avoid bool enum to work around a clang crash

See https://github.com/llvm/llvm-project/issues/56560

R=ahaas@chromium.org

Bug: chromium:1344641
Change-Id: I1cc475e1bb678029f7418cb440c52a150eba9a8e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3778717
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81861}
This commit is contained in:
Thibaud Michaud 2022-07-21 00:07:17 +02:00 committed by V8 LUCI CQ
parent 90c0b95860
commit 884226c1d0
3 changed files with 6 additions and 3 deletions

View File

@ -54,7 +54,7 @@ class WasmCode;
class WasmFeatures;
class WireBytesStorage;
enum class LoadTransformationKind : uint8_t;
enum Suspend : bool;
enum Suspend : uint8_t;
} // namespace wasm
namespace compiler {

View File

@ -83,7 +83,7 @@ class StructType;
struct WasmElemSegment;
class WasmValue;
enum class OnResume : int;
enum Suspend : bool;
enum Suspend : uint8_t;
} // namespace wasm
#endif

View File

@ -75,7 +75,10 @@ class V8_EXPORT_PRIVATE FunctionTargetAndRef {
};
namespace wasm {
enum Suspend : bool { kSuspend = true, kNoSuspend = false };
// TODO(thibaudm): Use a bool instead when this is resolved:
// https://github.com/llvm/llvm-project/issues/56560. See also
// crbug.com/1344641.
enum Suspend : uint8_t { kSuspend = 1, kNoSuspend = 0 };
enum class OnResume : int { kContinue, kThrow };
} // namespace wasm