diff options
author | Ian Lance Taylor <iant@golang.org> | 2021-05-18 20:07:29 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-05-18 20:07:29 -0700 |
commit | 2ebddf2ec55a77d6bd5aaad0f753a173054787a7 (patch) | |
tree | 81acdb2b466de520f6393d651fe28f512b168cbe /gcc/go | |
parent | c922c6539e63a775ee29751320d678f0a0a33d07 (diff) | |
download | gcc-2ebddf2ec55a77d6bd5aaad0f753a173054787a7.zip gcc-2ebddf2ec55a77d6bd5aaad0f753a173054787a7.tar.gz gcc-2ebddf2ec55a77d6bd5aaad0f753a173054787a7.tar.bz2 |
gofrontend: revert startswith change
This file is copied from a different repo and should not be changed
directly in the GCC repo.
Diffstat (limited to 'gcc/go')
-rw-r--r-- | gcc/go/gofrontend/runtime.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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<Runtime::Function>(i); } |