summaryrefslogtreecommitdiff
path: root/unittests/Bitcode/BitstreamReaderTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Bitcode/BitstreamReaderTest.cpp')
-rw-r--r--unittests/Bitcode/BitstreamReaderTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/unittests/Bitcode/BitstreamReaderTest.cpp b/unittests/Bitcode/BitstreamReaderTest.cpp
index 704eb803f9c7..935ef4bcffc0 100644
--- a/unittests/Bitcode/BitstreamReaderTest.cpp
+++ b/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);