summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-11-02 17:12:49 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-11-02 17:12:49 +0000
commit7e56fc6ae19e353ebdfaf327b46121b519a0c264 (patch)
tree051a78a140817133c66209406c911ac6c76e72dd /lib
parent30c8dc8c8210ac7b043f4f038858a2bfa1d0b151 (diff)
downloadllvm-7e56fc6ae19e353ebdfaf327b46121b519a0c264.tar.gz
llvm-7e56fc6ae19e353ebdfaf327b46121b519a0c264.tar.bz2
llvm-7e56fc6ae19e353ebdfaf327b46121b519a0c264.tar.xz
Revert "Don't use getSymbolNMTypeChar for implementing COFFObjectFile::getSymbolFileOffset."
Investigating a bot failure. This reverts commit r193928. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193929 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Object/COFFObjectFile.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Object/COFFObjectFile.cpp b/lib/Object/COFFObjectFile.cpp
index 2952d44b21..3d1e62e1e5 100644
--- a/lib/Object/COFFObjectFile.cpp
+++ b/lib/Object/COFFObjectFile.cpp
@@ -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;