Simplify getSymbolFlags.

None of the object formats require extra parsing to compute these flags,
so the method cannot fail.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200574 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2014-01-31 20:57:12 +00:00
parent c2c98e7884
commit d8324e6983
10 changed files with 22 additions and 35 deletions

View File

@ -719,8 +719,7 @@ static void writeSymbolTable(
for (object::symbol_iterator I = Obj->begin_symbols(),
E = Obj->end_symbols();
I != E; ++I) {
uint32_t Symflags;
failIfError(I->getFlags(Symflags));
uint32_t Symflags = I->getFlags();;
if (Symflags & object::SymbolRef::SF_FormatSpecific)
continue;
if (!(Symflags & object::SymbolRef::SF_Global))