aboutsummaryrefslogtreecommitdiff
path: root/gold/script.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-01-24 22:35:39 +0000
committerIan Lance Taylor <iant@google.com>2008-01-24 22:35:39 +0000
commit1dd940af63d6597646b96572532894e87836b5e2 (patch)
tree2d48bd9673afb5cd146bea901be5c35c46b87be3 /gold/script.h
parent82c18208b8100ecd9790494d312c419a03f36eb7 (diff)
downloadgdb-1dd940af63d6597646b96572532894e87836b5e2.zip
gdb-1dd940af63d6597646b96572532894e87836b5e2.tar.gz
gdb-1dd940af63d6597646b96572532894e87836b5e2.tar.bz2
From Craig Silverstein: Simplify Version_script_info::symbol_is_local
interface.
Diffstat (limited to 'gold/script.h')
-rw-r--r--gold/script.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/gold/script.h b/gold/script.h
index 4d8cfab..1f6aea6 100644
--- a/gold/script.h
+++ b/gold/script.h
@@ -115,12 +115,13 @@ class Version_script_info
{ return get_symbol_version_helper(symbol, true); }
// Return whether this symbol matches the local: section of a
- // version script (it doesn't matter which). This test is only
- // valid if get_symbol_version() returns the empty string, as we
- // don't test that here.
+ // version script (it doesn't matter which).
bool
symbol_is_local(const char* symbol) const
- { return !get_symbol_version_helper(symbol, false).empty(); }
+ {
+ return (get_symbol_version(symbol).empty()
+ && !get_symbol_version_helper(symbol, false).empty());
+ }
// Return the names of versions defined in the version script.
// Strings are allocated out of the stringpool given in the