summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/tools/clang/lib/Frontend/TestModuleFileExtension.cpp
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2017-01-24 08:32:59 +0000
committerpatrick <patrick@openbsd.org>2017-01-24 08:32:59 +0000
commit53d771aafdbe5b919f264f53cba3788e2c4cffd2 (patch)
tree7eca39498be0ff1e3a6daf583cd9ca5886bb2636 /gnu/llvm/tools/clang/lib/Frontend/TestModuleFileExtension.cpp
parentIn preparation of compiling our kernels with -ffreestanding, explicitly map (diff)
downloadwireguard-openbsd-53d771aafdbe5b919f264f53cba3788e2c4cffd2.tar.xz
wireguard-openbsd-53d771aafdbe5b919f264f53cba3788e2c4cffd2.zip
Import LLVM 4.0.0 rc1 including clang and lld to help the current
development effort on OpenBSD/arm64.
Diffstat (limited to 'gnu/llvm/tools/clang/lib/Frontend/TestModuleFileExtension.cpp')
-rw-r--r--gnu/llvm/tools/clang/lib/Frontend/TestModuleFileExtension.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/llvm/tools/clang/lib/Frontend/TestModuleFileExtension.cpp b/gnu/llvm/tools/clang/lib/Frontend/TestModuleFileExtension.cpp
index b43d45f7ae4..294f7e44cee 100644
--- a/gnu/llvm/tools/clang/lib/Frontend/TestModuleFileExtension.cpp
+++ b/gnu/llvm/tools/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;