[llvm] r193928 - Don't use getSymbolNMTypeChar for implementing COFFObjectFile::getSymbolFileOffset.
Rafael Espindola
rafael.espindola at gmail.com
Sat Nov 2 09:55:21 PDT 2013
Author: rafael
Date: Sat Nov 2 11:55:21 2013
New Revision: 193928
URL: http://llvm.org/viewvc/llvm-project?rev=193928&view=rev
Log:
Don't use getSymbolNMTypeChar for implementing COFFObjectFile::getSymbolFileOffset.
Modified:
llvm/trunk/lib/Object/COFFObjectFile.cpp
Modified: llvm/trunk/lib/Object/COFFObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/COFFObjectFile.cpp?rev=193928&r1=193927&r2=193928&view=diff
==============================================================================
--- llvm/trunk/lib/Object/COFFObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/COFFObjectFile.cpp Sat Nov 2 11:55:21 2013
@@ -112,10 +112,8 @@ error_code COFFObjectFile::getSymbolFile
const coff_section *Section = NULL;
if (error_code ec = getSection(symb->SectionNumber, Section))
return ec;
- char Type;
- if (error_code ec = getSymbolNMTypeChar(Symb, Type))
- return ec;
- if (Type == 'U' || Type == 'w')
+
+ if (symb->SectionNumber == COFF::IMAGE_SYM_UNDEFINED && symb->Value != 0)
Result = UnknownAddressOrSize;
else if (Section)
Result = Section->PointerToRawData + symb->Value;
More information about the llvm-commits
mailing list