summaryrefslogtreecommitdiff
path: root/lib/Serialization/GlobalModuleIndex.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-06 20:13:35 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-06 20:13:35 +0000
commit6694ed095d6b27a2c92ec4fd63664fcd88a05749 (patch)
tree0633c29bd8350e306f3a24a30f3f6045efd35420 /lib/Serialization/GlobalModuleIndex.cpp
parentd5dc75c5cf109efe52b1da32ec44a667389a0f0a (diff)
Diffstat (limited to 'lib/Serialization/GlobalModuleIndex.cpp')
-rw-r--r--lib/Serialization/GlobalModuleIndex.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Serialization/GlobalModuleIndex.cpp b/lib/Serialization/GlobalModuleIndex.cpp
index 9f986d54a989..ae5796ede126 100644
--- a/lib/Serialization/GlobalModuleIndex.cpp
+++ b/lib/Serialization/GlobalModuleIndex.cpp
@@ -744,11 +744,11 @@ void GlobalModuleIndexBuilder::writeIndex(llvm::BitstreamWriter &Stream) {
}
// Create a blob abbreviation
- BitCodeAbbrev *Abbrev = new BitCodeAbbrev();
+ auto Abbrev = std::make_shared<BitCodeAbbrev>();
Abbrev->Add(BitCodeAbbrevOp(IDENTIFIER_INDEX));
Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 32));
Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Blob));
- unsigned IDTableAbbrev = Stream.EmitAbbrev(Abbrev);
+ unsigned IDTableAbbrev = Stream.EmitAbbrev(std::move(Abbrev));
// Write the identifier table
uint64_t Record[] = {IDENTIFIER_INDEX, BucketOffset};