[lld] r270384 - Attempt to unbreak buildbots.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Sun May 22 16:52:57 PDT 2016
Author: ruiu
Date: Sun May 22 18:52:56 2016
New Revision: 270384
URL: http://llvm.org/viewvc/llvm-project?rev=270384&view=rev
Log:
Attempt to unbreak buildbots.
My last commit made Clang to fail with an assertion failure.
https://llvm.org/bugs/show_bug.cgi?id=27835
This is a patch to avoid that.
Modified:
lld/trunk/ELF/OutputSections.cpp
lld/trunk/ELF/OutputSections.h
Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=270384&r1=270383&r2=270384&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Sun May 22 18:52:56 2016
@@ -1125,7 +1125,7 @@ EHOutputSection<ELFT>::splitInputSection
// and where their relocations point to.
template <class ELFT>
template <class RelTy>
-CieRecord &EHOutputSection<ELFT>::addCie(SectionPiece &Piece,
+CieRecord *EHOutputSection<ELFT>::addCie(SectionPiece &Piece,
EHInputSection<ELFT> *Sec,
ArrayRef<RelTy> Rels) {
const endianness E = ELFT::TargetEndianness;
@@ -1137,14 +1137,14 @@ CieRecord &EHOutputSection<ELFT>::addCie
Personality = &Sec->getFile()->getRelocTargetSym(*Rel);
// Search for an existing CIE by CIE contents/relocation target pair.
- CieRecord &Cie = CieMap[{Piece.Data, Personality}];
+ CieRecord *Cie = &CieMap[{Piece.Data, Personality}];
// If not found, create a new one.
- if (Cie.Piece == nullptr) {
- Cie.Piece = &Piece;
+ if (Cie->Piece == nullptr) {
+ Cie->Piece = &Piece;
if (Config->EhFrameHdr)
- Cie.FdeEncoding = getFdeEncoding(Piece.Data);
- Cies.push_back(&Cie);
+ Cie->FdeEncoding = getFdeEncoding(Piece.Data);
+ Cies.push_back(Cie);
}
return Cie;
}
@@ -1184,14 +1184,14 @@ template <class RelTy>
void EHOutputSection<ELFT>::addSectionAux(EHInputSection<ELFT> *Sec,
ArrayRef<RelTy> Rels) {
SectionPiece &CiePiece = Sec->Pieces[0];
- CieRecord &Cie = addCie(CiePiece, Sec, Rels);
+ CieRecord *Cie = addCie(CiePiece, Sec, Rels);
for (size_t I = 1, End = Sec->Pieces.size(); I != End; ++I) {
SectionPiece &FdePiece = Sec->Pieces[I];
validateFde<ELFT>(FdePiece);
if (!isFdeLive(FdePiece, Sec, Rels))
continue;
- Cie.FdePieces.push_back(&FdePiece);
+ Cie->FdePieces.push_back(&FdePiece);
Out<ELFT>::EhFrameHdr->reserveFde();
}
}
Modified: lld/trunk/ELF/OutputSections.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.h?rev=270384&r1=270383&r2=270384&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.h (original)
+++ lld/trunk/ELF/OutputSections.h Sun May 22 18:52:56 2016
@@ -354,7 +354,7 @@ private:
std::vector<SectionPiece> splitInputSection(const EHInputSection<ELFT> *Sec);
template <class RelTy>
- CieRecord &addCie(SectionPiece &Piece, EHInputSection<ELFT> *Sec,
+ CieRecord *addCie(SectionPiece &Piece, EHInputSection<ELFT> *Sec,
ArrayRef<RelTy> Rels);
template <class RelTy>
More information about the llvm-commits
mailing list