[llvm] r193929 - Revert "Don't use getSymbolNMTypeChar for implementing COFFObjectFile::getSymbolFileOffset."
Rafael Espindola
rafael.espindola at gmail.com
Sat Nov 2 10:12:49 PDT 2013
Author: rafael
Date: Sat Nov 2 12:12:49 2013
New Revision: 193929
URL: http://llvm.org/viewvc/llvm-project?rev=193929&view=rev
Log:
Revert "Don't use getSymbolNMTypeChar for implementing COFFObjectFile::getSymbolFileOffset."
Investigating a bot failure.
This reverts commit r193928.
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=193929&r1=193928&r2=193929&view=diff
==============================================================================
--- llvm/trunk/lib/Object/COFFObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/COFFObjectFile.cpp Sat Nov 2 12:12:49 2013
@@ -112,8 +112,10 @@ error_code COFFObjectFile::getSymbolFile
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;
More information about the llvm-commits
mailing list