[llvm] r221485 - Object, COFF: Don't consider AuxFunctionDefinition for getSymbolSize
David Majnemer
david.majnemer at gmail.com
Thu Nov 6 13:46:55 PST 2014
Author: majnemer
Date: Thu Nov 6 15:46:55 2014
New Revision: 221485
URL: http://llvm.org/viewvc/llvm-project?rev=221485&view=rev
Log:
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.
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=221485&r1=221484&r2=221485&view=diff
==============================================================================
--- llvm/trunk/lib/Object/COFFObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/COFFObjectFile.cpp Thu Nov 6 15:46:55 2014
@@ -240,16 +240,6 @@ std::error_code COFFObjectFile::getSymbo
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.
More information about the llvm-commits
mailing list