Object, COFF: Don't consider AuxFunctionDefinition for getSymbolSize

mingw lies about the size of a function's AuxFunctionDefinition.  Ignore
the field and rely on our heuristic to determine the symbol's size.

llvm-svn: 221485
This commit is contained in:
David Majnemer 2014-11-06 21:46:55 +00:00
parent d1e71108d0
commit 504165df71
1 changed files with 0 additions and 10 deletions

View File

@ -240,16 +240,6 @@ std::error_code COFFObjectFile::getSymbolSize(DataRefImpl Ref,
Result = Symb.getValue();
return object_error::success;
}
if (Symb.isFunctionDefinition()) {
ArrayRef<uint8_t> AuxData = getSymbolAuxData(Symb);
if (!AuxData.empty()) {
const auto *CAFD =
reinterpret_cast<const coff_aux_function_definition *>(
AuxData.data());
Result = CAFD->TotalSize;
return object_error::success;
}
}
// Let's attempt to get the size of the symbol by looking at the address of
// the symbol after the symbol in question.