From 2ebddf2ec55a77d6bd5aaad0f753a173054787a7 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 18 May 2021 20:07:29 -0700 Subject: [PATCH] gofrontend: revert startswith change This file is copied from a different repo and should not be changed directly in the GCC repo. --- gcc/go/gofrontend/runtime.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/go/gofrontend/runtime.cc b/gcc/go/gofrontend/runtime.cc index 514c045..3cc5ded 100644 --- a/gcc/go/gofrontend/runtime.cc +++ b/gcc/go/gofrontend/runtime.cc @@ -463,7 +463,7 @@ Runtime::name_to_code(const std::string& name) // The names in the table have "runtime." prefix. We may be // called with a name without the prefix. Try matching // without the prefix as well. - if (startswith(runtime_function_name, "runtime.") + if (strncmp(runtime_function_name, "runtime.", 8) == 0 && strcmp(runtime_function_name + 8, name.c_str()) == 0) code = static_cast(i); } -- 2.7.4