]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gofrontend: revert startswith change
authorIan Lance Taylor <iant@golang.org>
Wed, 19 May 2021 03:07:29 +0000 (20:07 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 19 May 2021 03:07:29 +0000 (20:07 -0700)
This file is copied from a different repo and should not be changed
directly in the GCC repo.

gcc/go/gofrontend/runtime.cc

index 514c045a68fa99be98109dd37ee97e9825dc919e..3cc5ded3617641ea0d8cb04c43e75e88678cb00f 100644 (file)
@@ -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<Runtime::Function>(i);
     }