From: David Majnemer Date: Thu, 6 Nov 2014 21:46:55 +0000 (+0000) Subject: Object, COFF: Don't consider AuxFunctionDefinition for getSymbolSize X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c4e8fb94df7bc4fdc2b5dfaeaa68f0838edfdb09;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221485 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Object/COFFObjectFile.cpp b/lib/Object/COFFObjectFile.cpp index 7a0892dd98d..eea84c78762 100644 --- a/lib/Object/COFFObjectFile.cpp +++ b/lib/Object/COFFObjectFile.cpp @@ -240,16 +240,6 @@ std::error_code COFFObjectFile::getSymbolSize(DataRefImpl Ref, Result = Symb.getValue(); return object_error::success; } - if (Symb.isFunctionDefinition()) { - ArrayRef AuxData = getSymbolAuxData(Symb); - if (!AuxData.empty()) { - const auto *CAFD = - reinterpret_cast( - 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.