diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2017-03-28 22:31:35 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2017-03-28 22:31:35 +0000 |
commit | aba00eee42201f8027be89ac5191f53f6fb5fef2 (patch) | |
tree | b69e2f4b5e468158c86a9a4924b6c7dfc3d14203 /tools/gold | |
parent | bdb8cec802d2b261b49ad471abaa2351a9c2d92c (diff) |
LTO: Replace InputFile::Symbol::getFlags() with predicate accessors. NFC.
This makes the predicates independent of the flag representation
and makes the code a little easier to read.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298951 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/gold')
-rw-r--r-- | tools/gold/gold-plugin.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/gold/gold-plugin.cpp b/tools/gold/gold-plugin.cpp index 719c5db050ac..52d352f4bc76 100644 --- a/tools/gold/gold-plugin.cpp +++ b/tools/gold/gold-plugin.cpp @@ -496,8 +496,6 @@ static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file, sys::path::filename(Obj->getSourceFileName()).str(); for (auto &Sym : Obj->symbols()) { - uint32_t Symflags = Sym.getFlags(); - cf.syms.push_back(ld_plugin_symbol()); ld_plugin_symbol &sym = cf.syms.back(); sym.version = nullptr; @@ -523,13 +521,13 @@ static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file, break; } - if (Symflags & object::BasicSymbolRef::SF_Undefined) { + if (Sym.isUndefined()) { sym.def = LDPK_UNDEF; - if (Symflags & object::BasicSymbolRef::SF_Weak) + if (Sym.isWeak()) sym.def = LDPK_WEAKUNDEF; - } else if (Symflags & object::BasicSymbolRef::SF_Common) + } else if (Sym.isCommon()) sym.def = LDPK_COMMON; - else if (Symflags & object::BasicSymbolRef::SF_Weak) + else if (Sym.isWeak()) sym.def = LDPK_WEAKDEF; else sym.def = LDPK_DEF; |