[llvm] r305369 - Use make_shared instead of make_unique.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 13 22:48:33 PDT 2017
Author: zturner
Date: Wed Jun 14 00:48:33 2017
New Revision: 305369
URL: http://llvm.org/viewvc/llvm-project?rev=305369&view=rev
Log:
Use make_shared instead of make_unique.
Modified:
llvm/trunk/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
Modified: llvm/trunk/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp?rev=305369&r1=305368&r2=305369&view=diff
==============================================================================
--- llvm/trunk/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp (original)
+++ llvm/trunk/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp Wed Jun 14 00:48:33 2017
@@ -503,7 +503,7 @@ std::shared_ptr<DebugSubsection> YAMLFra
const codeview::StringsAndChecksums &SC) const {
assert(SC.hasStrings());
- auto Result = llvm::make_unique<DebugFrameDataSubsection>();
+ auto Result = std::make_shared<DebugFrameDataSubsection>();
for (const auto &YF : Frames) {
codeview::FrameData F;
F.CodeSize = YF.CodeSize;
@@ -524,7 +524,7 @@ std::shared_ptr<DebugSubsection>
YAMLCoffSymbolRVASubsection::toCodeViewSubsection(
BumpPtrAllocator &Allocator,
const codeview::StringsAndChecksums &SC) const {
- auto Result = llvm::make_unique<DebugSymbolRVASubsection>();
+ auto Result = std::make_shared<DebugSymbolRVASubsection>();
for (const auto &RVA : RVAs)
Result->addRVA(RVA);
return Result;
More information about the llvm-commits
mailing list