Skip to content

Commit 2a0bc36

Browse files
gengjiawenV8 LUCI CQ
authored andcommitted
[parser] Fix the MSVC build
MSVC seems to instantiate the Parser::PreParserIdentifierToAstRawString method despite it being unused. This CL adds an (unreachable) definition for it. Bug: v8:12266 Change-Id: I355ca82a9d6b7bc8cd16768a8df93e40f8bfc638 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3199856 Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/main@{#77313}
1 parent 64e0bcf commit 2a0bc36

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/parsing/parser.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,13 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
709709
return arg;
710710
}
711711

712+
const AstRawString* PreParserIdentifierToAstRawString(
713+
const PreParserIdentifier& arg) {
714+
// This method definition is only needed due to an MSVC oddity that
715+
// instantiates the method despite it being unused. See crbug.com/v8/12266 .
716+
UNREACHABLE();
717+
}
718+
712719
IterationStatement* AsIterationStatement(BreakableStatement* s) {
713720
return s->AsIterationStatement();
714721
}

0 commit comments

Comments
 (0)