Revert "Make BitCodeAbbrev ownership explicit using shared_ptr rather than IntrusiveRefCntPtr"

Breaks Clang's use of bitcode. Reverting until I have a fix to go with
it there.

This reverts commit r291006.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291007 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2017-01-04 21:19:28 +00:00
parent fe94ca2934
commit 23e393fa4d
7 changed files with 127 additions and 119 deletions
+2 -2
View File
@@ -273,7 +273,7 @@ unsigned BitstreamCursor::readRecord(unsigned AbbrevID,
}
void BitstreamCursor::ReadAbbrevRecord() {
auto Abbv = std::make_shared<BitCodeAbbrev>();
BitCodeAbbrev *Abbv = new BitCodeAbbrev();
unsigned NumOpInfo = ReadVBR(5);
for (unsigned i = 0; i != NumOpInfo; ++i) {
bool IsLiteral = Read(1);
@@ -307,7 +307,7 @@ void BitstreamCursor::ReadAbbrevRecord() {
if (Abbv->getNumOperandInfos() == 0)
report_fatal_error("Abbrev record with no operands");
CurAbbrevs.push_back(std::move(Abbv));
CurAbbrevs.push_back(Abbv);
}
Optional<BitstreamBlockInfo>