diff options
Diffstat (limited to 'llvm/unittests/Bitcode/BitstreamReaderTest.cpp')
-rw-r--r-- | llvm/unittests/Bitcode/BitstreamReaderTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/Bitcode/BitstreamReaderTest.cpp b/llvm/unittests/Bitcode/BitstreamReaderTest.cpp index 704eb803f9c..935ef4bcffc 100644 --- a/llvm/unittests/Bitcode/BitstreamReaderTest.cpp +++ b/llvm/unittests/Bitcode/BitstreamReaderTest.cpp @@ -101,10 +101,10 @@ TEST(BitstreamReaderTest, readRecordWithBlobWhileStreaming) { Stream.Emit(Magic, 32); Stream.EnterSubblock(BlockID, 3); - BitCodeAbbrev *Abbrev = new BitCodeAbbrev(); + auto Abbrev = std::make_shared<BitCodeAbbrev>(); Abbrev->Add(BitCodeAbbrevOp(RecordID)); Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Blob)); - AbbrevID = Stream.EmitAbbrev(Abbrev); + AbbrevID = Stream.EmitAbbrev(std::move(Abbrev)); unsigned Record[] = {RecordID}; Stream.EmitRecordWithBlob(AbbrevID, makeArrayRef(Record), BlobIn); |