diff --git a/frontends/parsers/parserDriver.cpp b/frontends/parsers/parserDriver.cpp index 5cbbcd6e481..01a2f622a3b 100644 --- a/frontends/parsers/parserDriver.cpp +++ b/frontends/parsers/parserDriver.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include @@ -99,7 +100,7 @@ void AbstractParserDriver::onReadIdentifier(cstring id) { lastIdentifier = id; } void AbstractParserDriver::onParseError(const Util::SourceInfo &location, const std::string &message) { - static const std::string unexpectedIdentifierError = "syntax error, unexpected IDENTIFIER"; + static const std::string_view unexpectedIdentifierError = "syntax error, unexpected IDENTIFIER"; auto &context = BaseCompileContext::get(); if (message == unexpectedIdentifierError) { context.errorReporter().parser_error(