diff options
author | David Blaikie <dblaikie@gmail.com> | 2017-01-04 22:36:43 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2017-01-04 22:36:43 +0000 |
commit | b44f0bfb3a14fa757f49cba64cf452a2eee969b9 (patch) | |
tree | 7decc83fa58cc65f09c80df2dd2cb99892a96be1 /clang/lib/Frontend/TestModuleFileExtension.cpp | |
parent | 43a38450a94a569c3e33dfc1780f0a81ff085b31 (diff) | |
download | bcm5719-llvm-b44f0bfb3a14fa757f49cba64cf452a2eee969b9.tar.gz bcm5719-llvm-b44f0bfb3a14fa757f49cba64cf452a2eee969b9.zip |
Fix for LLVM Bitcode API change (to use std::shared_ptr)
llvm-svn: 291018
Diffstat (limited to 'clang/lib/Frontend/TestModuleFileExtension.cpp')
-rw-r--r-- | clang/lib/Frontend/TestModuleFileExtension.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Frontend/TestModuleFileExtension.cpp b/clang/lib/Frontend/TestModuleFileExtension.cpp index b43d45f7ae4..294f7e44cee 100644 --- a/clang/lib/Frontend/TestModuleFileExtension.cpp +++ b/clang/lib/Frontend/TestModuleFileExtension.cpp @@ -24,11 +24,11 @@ void TestModuleFileExtension::Writer::writeExtensionContents( using namespace llvm; // Write an abbreviation for this record. - BitCodeAbbrev *Abv = new llvm::BitCodeAbbrev(); + auto Abv = std::make_shared<llvm::BitCodeAbbrev>(); Abv->Add(BitCodeAbbrevOp(FIRST_EXTENSION_RECORD_ID)); Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // # of characters Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Blob)); // message - auto Abbrev = Stream.EmitAbbrev(Abv); + auto Abbrev = Stream.EmitAbbrev(std::move(Abv)); // Write a message into the extension block. SmallString<64> Message; |