aboutsummaryrefslogtreecommitdiff
path: root/gold/icf.h
diff options
context:
space:
mode:
authorSriraman Tallam <tmsriram@google.com>2011-02-02 21:55:29 +0000
committerSriraman Tallam <tmsriram@google.com>2011-02-02 21:55:29 +0000
commit4e271fffeca9db3e0eea8d57b98aa7130f941225 (patch)
tree6fc646675e808e481b0f3e5bf85495fc68d6fe3a /gold/icf.h
parente0634ccfe8718b76b5e77c983a3cebfa7707747a (diff)
downloadgdb-4e271fffeca9db3e0eea8d57b98aa7130f941225.zip
gdb-4e271fffeca9db3e0eea8d57b98aa7130f941225.tar.gz
gdb-4e271fffeca9db3e0eea8d57b98aa7130f941225.tar.bz2
2011-02-02 Sriraman Tallam <tmsriram@google.com>
* icf.h (is_section_foldable_candidate): Change type of parameter to std::string. * icf.cc (Icf::find_identical_sections): Change type of local variable section_name to be std::string. (is_function_ctor_or_dtor): Change type of parameter to std::string.
Diffstat (limited to 'gold/icf.h')
-rw-r--r--gold/icf.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/gold/icf.h b/gold/icf.h
index 396dda0..f158137 100644
--- a/gold/icf.h
+++ b/gold/icf.h
@@ -168,10 +168,11 @@ class Icf
// earlier gcc versions, like 4.0.3, put constructors and destructors in
// .gnu.linkonce.t sections and hence should be included too.
inline bool
-is_section_foldable_candidate(const char* section_name)
+is_section_foldable_candidate(const std::string& section_name)
{
- return (is_prefix_of(".text", section_name)
- || is_prefix_of(".gnu.linkonce.t", section_name));
+ const char* section_name_cstr = section_name.c_str();
+ return (is_prefix_of(".text", section_name_cstr)
+ || is_prefix_of(".gnu.linkonce.t", section_name_cstr));
}
} // End of namespace gold.