From bdc50b6d92a4f79af98a78ba3c2dd3a63fefba40 Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Fri, 24 Feb 2023 17:09:29 +0100 Subject: FIXUP: Mark Node::opcode() and Operator::opcode() as constexpr. Ignore constexpr for GCC 7 or older to make LinuxRHEL CI happy. Change-Id: I6784350b16732640d9bd1d41b7403b5059f16737 Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/462765 Reviewed-by: Allan Sandfeld Jensen --- chromium/v8/src/compiler/node.h | 5 ++++- chromium/v8/src/compiler/operator.h | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/chromium/v8/src/compiler/node.h b/chromium/v8/src/compiler/node.h index 83ff9e256ce..945f1ab638f 100644 --- a/chromium/v8/src/compiler/node.h +++ b/chromium/v8/src/compiler/node.h @@ -50,7 +50,10 @@ class V8_EXPORT_PRIVATE Node final { const Operator* op() const { return op_; } - constexpr IrOpcode::Value opcode() const { +#if !defined(__GNUC__) || (__GNUC__ >= 8) + constexpr +#endif + IrOpcode::Value opcode() const { DCHECK_GE(IrOpcode::kLast, op_->opcode()); return static_cast(op_->opcode()); } diff --git a/chromium/v8/src/compiler/operator.h b/chromium/v8/src/compiler/operator.h index 94d70588672..57f1b7d4dc4 100644 --- a/chromium/v8/src/compiler/operator.h +++ b/chromium/v8/src/compiler/operator.h @@ -69,7 +69,10 @@ class V8_EXPORT_PRIVATE Operator : public NON_EXPORTED_BASE(ZoneObject) { // A small integer unique to all instances of a particular kind of operator, // useful for quick matching for specific kinds of operators. For fast access // the opcode is stored directly in the operator object. - constexpr Opcode opcode() const { return opcode_; } +#if !defined(__GNUC__) || (__GNUC__ >= 8) + constexpr +#endif + Opcode opcode() const { return opcode_; } // Returns a constant string representing the mnemonic of the operator, // without the static parameters. Useful for debugging. -- cgit v1.2.1