Revert "Don't use getSymbolNMTypeChar for implementing COFFObjectFile::getSymbolFileOffset."

Investigating a bot failure.

This reverts commit r193928.

llvm-svn: 193929
This commit is contained in:
Rafael Espindola 2013-11-02 17:12:49 +00:00
parent 48d0bb950d
commit 7700d8bba5
1 changed files with 4 additions and 2 deletions

View File

@ -112,8 +112,10 @@ error_code COFFObjectFile::getSymbolFileOffset(DataRefImpl Symb,
const coff_section *Section = NULL;
if (error_code ec = getSection(symb->SectionNumber, Section))
return ec;
if (symb->SectionNumber == COFF::IMAGE_SYM_UNDEFINED && symb->Value != 0)
char Type;
if (error_code ec = getSymbolNMTypeChar(Symb, Type))
return ec;
if (Type == 'U' || Type == 'w')
Result = UnknownAddressOrSize;
else if (Section)
Result = Section->PointerToRawData + symb->Value;