Commit 48fa759e authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[torque] Add missing header for std::strlen

Bug: v8:7793
Change-Id: I0349b4fe3b69e5403a111a5fd43ff11021b7cf0b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1598701
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61279}
parent eae5c62d
......@@ -5,6 +5,7 @@
#ifndef V8_TORQUE_CONSTANTS_H_
#define V8_TORQUE_CONSTANTS_H_
#include <cstring>
#include <string>
namespace v8 {
......@@ -44,12 +45,13 @@ static const char* const CONST_INT32_TYPE_STRING = "constexpr int32";
static const char* const CONST_FLOAT64_TYPE_STRING = "constexpr float64";
inline bool IsConstexprName(const std::string& name) {
return name.substr(0, strlen(CONSTEXPR_TYPE_PREFIX)) == CONSTEXPR_TYPE_PREFIX;
return name.substr(0, std::strlen(CONSTEXPR_TYPE_PREFIX)) ==
CONSTEXPR_TYPE_PREFIX;
}
inline std::string GetNonConstexprName(const std::string& name) {
if (!IsConstexprName(name)) return name;
return name.substr(strlen(CONSTEXPR_TYPE_PREFIX));
return name.substr(std::strlen(CONSTEXPR_TYPE_PREFIX));
}
inline std::string GetConstexprName(const std::string& name) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment