Fix MSVC build when WASM is disabled.
MSVC has trouble with macro expansion in this case. Avoid the issue by simply writing out 2 separate DCHECKs. Change-Id: Ib379db95fab91ff7f29b817f1ebcad9b64806787 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4074286 Reviewed-by: Maya Lekova <mslekova@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/main@{#84666}
This commit is contained in:
parent
5073ba7d52
commit
d0d6ed66fd
@ -55,12 +55,15 @@ std::ostream& operator<<(std::ostream& os, TrapId trap_id) {
|
||||
}
|
||||
|
||||
TrapId TrapIdOf(const Operator* const op) {
|
||||
DCHECK(op->opcode() == IrOpcode::kTrapIf ||
|
||||
op->opcode() == IrOpcode::kTrapUnless
|
||||
#if V8_ENABLE_WEBASSEMBLY
|
||||
|| op->opcode() == IrOpcode::kAssertNotNull
|
||||
// Combining this with the #else into a single DCHECK() does not with MSVC.
|
||||
DCHECK(op->opcode() == IrOpcode::kTrapIf ||
|
||||
op->opcode() == IrOpcode::kTrapUnless ||
|
||||
op->opcode() == IrOpcode::kAssertNotNull);
|
||||
#else
|
||||
DCHECK(op->opcode() == IrOpcode::kTrapIf ||
|
||||
op->opcode() == IrOpcode::kTrapUnless);
|
||||
#endif
|
||||
);
|
||||
return OpParameter<TrapId>(op);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user