Fix build without asserts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238597 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2015-05-29 19:04:38 +00:00
parent 5b68a837c7
commit 21a7b73e04

View File

@ -451,10 +451,12 @@ static uint8_t mergeTypeForSet(uint8_t origType, uint8_t newType) {
void ELFObjectWriter::writeSymbol(SymbolTableWriter &Writer,
uint32_t StringIndex, ELFSymbolData &MSD,
const MCAsmLayout &Layout) {
#ifndef NDEBUG
MCSymbolData &OrigData = MSD.Symbol->getData();
assert((!OrigData.getFragment() ||
(OrigData.getFragment()->getParent() == &MSD.Symbol->getSection())) &&
"The symbol's section doesn't match the fragment's symbol");
#endif
const MCSymbol *Base = Layout.getBaseSymbol(*MSD.Symbol);
// This has to be in sync with when computeSymbolTable uses SHN_ABS or