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 | 0d56b959adc7dc3cc1c573d55a4f535b9d2aaa42 (patch) | |
tree | 7b23cf8705739891246b4444fd4c2a4a3b8b210c /llvm/lib/LTO/LTO.cpp | |
parent | 9747d8070b03ec3cef71c1b04e513c6a8d84b0ad (diff) | |
download | bcm5719-llvm-0d56b959adc7dc3cc1c573d55a4f535b9d2aaa42.tar.gz bcm5719-llvm-0d56b959adc7dc3cc1c573d55a4f535b9d2aaa42.zip |
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.
llvm-svn: 298951
Diffstat (limited to 'llvm/lib/LTO/LTO.cpp')
-rw-r--r-- | llvm/lib/LTO/LTO.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp index f5e80041130..de02de9d614 100644 --- a/llvm/lib/LTO/LTO.cpp +++ b/llvm/lib/LTO/LTO.cpp @@ -575,7 +575,7 @@ Error LTO::addRegularLTO(BitcodeModule BM, const SymbolResolution *&ResI, if (Sym.isGV()) { GlobalValue *GV = Sym.getGV(); if (Res.Prevailing) { - if (Sym.getFlags() & object::BasicSymbolRef::SF_Undefined) + if (Sym.isUndefined()) continue; Keep.push_back(GV); switch (GV->getLinkage()) { @@ -608,7 +608,7 @@ Error LTO::addRegularLTO(BitcodeModule BM, const SymbolResolution *&ResI, // Common resolution: collect the maximum size/alignment over all commons. // We also record if we see an instance of a common as prevailing, so that // if none is prevailing we can ignore it later. - if (Sym.getFlags() & object::BasicSymbolRef::SF_Common) { + if (Sym.isCommon()) { // FIXME: We should figure out what to do about commons defined by asm. // For now they aren't reported correctly by ModuleSymbolTable. auto &CommonRes = RegularLTO.Commons[Sym.getGV()->getName()]; |