summaryrefslogtreecommitdiffstats
path: root/llvm/tools/obj2yaml
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/obj2yaml')
-rw-r--r--llvm/tools/obj2yaml/elf2yaml.cpp22
-rw-r--r--llvm/tools/obj2yaml/macho2yaml.cpp2
-rw-r--r--llvm/tools/obj2yaml/wasm2yaml.cpp40
3 files changed, 32 insertions, 32 deletions
diff --git a/llvm/tools/obj2yaml/elf2yaml.cpp b/llvm/tools/obj2yaml/elf2yaml.cpp
index a228d3917ee..baa1b863273 100644
--- a/llvm/tools/obj2yaml/elf2yaml.cpp
+++ b/llvm/tools/obj2yaml/elf2yaml.cpp
@@ -137,7 +137,7 @@ ELFDumper<ELFT>::getUniquedSymbolName(const Elf_Sym *Sym, StringRef StrTable,
}
template <class ELFT> Expected<ELFYAML::Object *> ELFDumper<ELFT>::dump() {
- auto Y = make_unique<ELFYAML::Object>();
+ auto Y = std::make_unique<ELFYAML::Object>();
// Dump header. We do not dump SHEntSize, SHOffset, SHNum and SHStrNdx field.
// When not explicitly set, the values are set by yaml2obj automatically
@@ -453,7 +453,7 @@ Error ELFDumper<ELFT>::dumpCommonRelocationSection(
template <class ELFT>
Expected<ELFYAML::DynamicSection *>
ELFDumper<ELFT>::dumpDynamicSection(const Elf_Shdr *Shdr) {
- auto S = make_unique<ELFYAML::DynamicSection>();
+ auto S = std::make_unique<ELFYAML::DynamicSection>();
if (Error E = dumpCommonSection(Shdr, *S))
return std::move(E);
@@ -470,7 +470,7 @@ ELFDumper<ELFT>::dumpDynamicSection(const Elf_Shdr *Shdr) {
template <class ELFT>
Expected<ELFYAML::RelocationSection *>
ELFDumper<ELFT>::dumpRelocSection(const Elf_Shdr *Shdr) {
- auto S = make_unique<ELFYAML::RelocationSection>();
+ auto S = std::make_unique<ELFYAML::RelocationSection>();
if (auto E = dumpCommonRelocationSection(Shdr, *S))
return std::move(E);
@@ -508,7 +508,7 @@ ELFDumper<ELFT>::dumpRelocSection(const Elf_Shdr *Shdr) {
template <class ELFT>
Expected<ELFYAML::RawContentSection *>
ELFDumper<ELFT>::dumpContentSection(const Elf_Shdr *Shdr) {
- auto S = make_unique<ELFYAML::RawContentSection>();
+ auto S = std::make_unique<ELFYAML::RawContentSection>();
if (Error E = dumpCommonSection(Shdr, *S))
return std::move(E);
@@ -532,7 +532,7 @@ ELFDumper<ELFT>::dumpContentSection(const Elf_Shdr *Shdr) {
template <class ELFT>
Expected<ELFYAML::SymtabShndxSection *>
ELFDumper<ELFT>::dumpSymtabShndxSection(const Elf_Shdr *Shdr) {
- auto S = make_unique<ELFYAML::SymtabShndxSection>();
+ auto S = std::make_unique<ELFYAML::SymtabShndxSection>();
if (Error E = dumpCommonSection(Shdr, *S))
return std::move(E);
@@ -547,7 +547,7 @@ ELFDumper<ELFT>::dumpSymtabShndxSection(const Elf_Shdr *Shdr) {
template <class ELFT>
Expected<ELFYAML::NoBitsSection *>
ELFDumper<ELFT>::dumpNoBitsSection(const Elf_Shdr *Shdr) {
- auto S = make_unique<ELFYAML::NoBitsSection>();
+ auto S = std::make_unique<ELFYAML::NoBitsSection>();
if (Error E = dumpCommonSection(Shdr, *S))
return std::move(E);
S->Size = Shdr->sh_size;
@@ -561,7 +561,7 @@ ELFDumper<ELFT>::dumpVerdefSection(const Elf_Shdr *Shdr) {
typedef typename ELFT::Verdef Elf_Verdef;
typedef typename ELFT::Verdaux Elf_Verdaux;
- auto S = make_unique<ELFYAML::VerdefSection>();
+ auto S = std::make_unique<ELFYAML::VerdefSection>();
if (Error E = dumpCommonSection(Shdr, *S))
return std::move(E);
@@ -610,7 +610,7 @@ Expected<ELFYAML::SymverSection *>
ELFDumper<ELFT>::dumpSymverSection(const Elf_Shdr *Shdr) {
typedef typename ELFT::Half Elf_Half;
- auto S = make_unique<ELFYAML::SymverSection>();
+ auto S = std::make_unique<ELFYAML::SymverSection>();
if (Error E = dumpCommonSection(Shdr, *S))
return std::move(E);
@@ -629,7 +629,7 @@ ELFDumper<ELFT>::dumpVerneedSection(const Elf_Shdr *Shdr) {
typedef typename ELFT::Verneed Elf_Verneed;
typedef typename ELFT::Vernaux Elf_Vernaux;
- auto S = make_unique<ELFYAML::VerneedSection>();
+ auto S = std::make_unique<ELFYAML::VerneedSection>();
if (Error E = dumpCommonSection(Shdr, *S))
return std::move(E);
@@ -682,7 +682,7 @@ ELFDumper<ELFT>::dumpVerneedSection(const Elf_Shdr *Shdr) {
template <class ELFT>
Expected<ELFYAML::Group *> ELFDumper<ELFT>::dumpGroup(const Elf_Shdr *Shdr) {
- auto S = make_unique<ELFYAML::Group>();
+ auto S = std::make_unique<ELFYAML::Group>();
if (Error E = dumpCommonSection(Shdr, *S))
return std::move(E);
@@ -730,7 +730,7 @@ Expected<ELFYAML::MipsABIFlags *>
ELFDumper<ELFT>::dumpMipsABIFlags(const Elf_Shdr *Shdr) {
assert(Shdr->sh_type == ELF::SHT_MIPS_ABIFLAGS &&
"Section type is not SHT_MIPS_ABIFLAGS");
- auto S = make_unique<ELFYAML::MipsABIFlags>();
+ auto S = std::make_unique<ELFYAML::MipsABIFlags>();
if (Error E = dumpCommonSection(Shdr, *S))
return std::move(E);
diff --git a/llvm/tools/obj2yaml/macho2yaml.cpp b/llvm/tools/obj2yaml/macho2yaml.cpp
index 63e81686632..95c42de9fae 100644
--- a/llvm/tools/obj2yaml/macho2yaml.cpp
+++ b/llvm/tools/obj2yaml/macho2yaml.cpp
@@ -180,7 +180,7 @@ const char *MachODumper::processLoadCommandData<MachO::build_version_command>(
}
Expected<std::unique_ptr<MachOYAML::Object>> MachODumper::dump() {
- auto Y = make_unique<MachOYAML::Object>();
+ auto Y = std::make_unique<MachOYAML::Object>();
Y->IsLittleEndian = Obj.isLittleEndian();
dumpHeader(Y);
dumpLoadCommands(Y);
diff --git a/llvm/tools/obj2yaml/wasm2yaml.cpp b/llvm/tools/obj2yaml/wasm2yaml.cpp
index 47d984b53fb..7a540974d50 100644
--- a/llvm/tools/obj2yaml/wasm2yaml.cpp
+++ b/llvm/tools/obj2yaml/wasm2yaml.cpp
@@ -53,7 +53,7 @@ WasmDumper::dumpCustomSection(const WasmSection &WasmSec) {
std::unique_ptr<WasmYAML::CustomSection> CustomSec;
if (WasmSec.Name == "dylink") {
std::unique_ptr<WasmYAML::DylinkSection> DylinkSec =
- make_unique<WasmYAML::DylinkSection>();
+ std::make_unique<WasmYAML::DylinkSection>();
const wasm::WasmDylinkInfo& Info = Obj.dylinkInfo();
DylinkSec->MemorySize = Info.MemorySize;
DylinkSec->MemoryAlignment = Info.MemoryAlignment;
@@ -63,7 +63,7 @@ WasmDumper::dumpCustomSection(const WasmSection &WasmSec) {
CustomSec = std::move(DylinkSec);
} else if (WasmSec.Name == "name") {
std::unique_ptr<WasmYAML::NameSection> NameSec =
- make_unique<WasmYAML::NameSection>();
+ std::make_unique<WasmYAML::NameSection>();
for (const llvm::wasm::WasmFunctionName &Func : Obj.debugNames()) {
WasmYAML::NameEntry NameEntry;
NameEntry.Name = Func.Name;
@@ -73,7 +73,7 @@ WasmDumper::dumpCustomSection(const WasmSection &WasmSec) {
CustomSec = std::move(NameSec);
} else if (WasmSec.Name == "linking") {
std::unique_ptr<WasmYAML::LinkingSection> LinkingSec =
- make_unique<WasmYAML::LinkingSection>();
+ std::make_unique<WasmYAML::LinkingSection>();
LinkingSec->Version = Obj.linkingData().Version;
ArrayRef<StringRef> Comdats = Obj.linkingData().Comdats;
@@ -134,7 +134,7 @@ WasmDumper::dumpCustomSection(const WasmSection &WasmSec) {
CustomSec = std::move(LinkingSec);
} else if (WasmSec.Name == "producers") {
std::unique_ptr<WasmYAML::ProducersSection> ProducersSec =
- make_unique<WasmYAML::ProducersSection>();
+ std::make_unique<WasmYAML::ProducersSection>();
const llvm::wasm::WasmProducerInfo &Info = Obj.getProducerInfo();
for (auto &E : Info.Languages) {
WasmYAML::ProducerEntry Producer;
@@ -157,7 +157,7 @@ WasmDumper::dumpCustomSection(const WasmSection &WasmSec) {
CustomSec = std::move(ProducersSec);
} else if (WasmSec.Name == "target_features") {
std::unique_ptr<WasmYAML::TargetFeaturesSection> TargetFeaturesSec =
- make_unique<WasmYAML::TargetFeaturesSection>();
+ std::make_unique<WasmYAML::TargetFeaturesSection>();
for (auto &E : Obj.getTargetFeatures()) {
WasmYAML::FeatureEntry Feature;
Feature.Prefix = E.Prefix;
@@ -166,14 +166,14 @@ WasmDumper::dumpCustomSection(const WasmSection &WasmSec) {
}
CustomSec = std::move(TargetFeaturesSec);
} else {
- CustomSec = make_unique<WasmYAML::CustomSection>(WasmSec.Name);
+ CustomSec = std::make_unique<WasmYAML::CustomSection>(WasmSec.Name);
}
CustomSec->Payload = yaml::BinaryRef(WasmSec.Content);
return CustomSec;
}
ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
- auto Y = make_unique<WasmYAML::Object>();
+ auto Y = std::make_unique<WasmYAML::Object>();
// Dump header
Y->Header.Version = Obj.getHeader().Version;
@@ -193,7 +193,7 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
break;
}
case wasm::WASM_SEC_TYPE: {
- auto TypeSec = make_unique<WasmYAML::TypeSection>();
+ auto TypeSec = std::make_unique<WasmYAML::TypeSection>();
uint32_t Index = 0;
for (const auto &FunctionSig : Obj.types()) {
WasmYAML::Signature Sig;
@@ -211,7 +211,7 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
break;
}
case wasm::WASM_SEC_IMPORT: {
- auto ImportSec = make_unique<WasmYAML::ImportSection>();
+ auto ImportSec = std::make_unique<WasmYAML::ImportSection>();
for (auto &Import : Obj.imports()) {
WasmYAML::Import Im;
Im.Module = Import.Module;
@@ -242,7 +242,7 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
break;
}
case wasm::WASM_SEC_FUNCTION: {
- auto FuncSec = make_unique<WasmYAML::FunctionSection>();
+ auto FuncSec = std::make_unique<WasmYAML::FunctionSection>();
for (const auto &Func : Obj.functionTypes()) {
FuncSec->FunctionTypes.push_back(Func);
}
@@ -250,7 +250,7 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
break;
}
case wasm::WASM_SEC_TABLE: {
- auto TableSec = make_unique<WasmYAML::TableSection>();
+ auto TableSec = std::make_unique<WasmYAML::TableSection>();
for (const wasm::WasmTable &Table : Obj.tables()) {
TableSec->Tables.push_back(makeTable(Table));
}
@@ -258,7 +258,7 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
break;
}
case wasm::WASM_SEC_MEMORY: {
- auto MemorySec = make_unique<WasmYAML::MemorySection>();
+ auto MemorySec = std::make_unique<WasmYAML::MemorySection>();
for (const wasm::WasmLimits &Memory : Obj.memories()) {
MemorySec->Memories.push_back(makeLimits(Memory));
}
@@ -266,7 +266,7 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
break;
}
case wasm::WASM_SEC_GLOBAL: {
- auto GlobalSec = make_unique<WasmYAML::GlobalSection>();
+ auto GlobalSec = std::make_unique<WasmYAML::GlobalSection>();
for (auto &Global : Obj.globals()) {
WasmYAML::Global G;
G.Index = Global.Index;
@@ -279,7 +279,7 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
break;
}
case wasm::WASM_SEC_EVENT: {
- auto EventSec = make_unique<WasmYAML::EventSection>();
+ auto EventSec = std::make_unique<WasmYAML::EventSection>();
for (auto &Event : Obj.events()) {
WasmYAML::Event E;
E.Index = Event.Index;
@@ -291,13 +291,13 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
break;
}
case wasm::WASM_SEC_START: {
- auto StartSec = make_unique<WasmYAML::StartSection>();
+ auto StartSec = std::make_unique<WasmYAML::StartSection>();
StartSec->StartFunction = Obj.startFunction();
S = std::move(StartSec);
break;
}
case wasm::WASM_SEC_EXPORT: {
- auto ExportSec = make_unique<WasmYAML::ExportSection>();
+ auto ExportSec = std::make_unique<WasmYAML::ExportSection>();
for (auto &Export : Obj.exports()) {
WasmYAML::Export Ex;
Ex.Name = Export.Name;
@@ -309,7 +309,7 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
break;
}
case wasm::WASM_SEC_ELEM: {
- auto ElemSec = make_unique<WasmYAML::ElemSection>();
+ auto ElemSec = std::make_unique<WasmYAML::ElemSection>();
for (auto &Segment : Obj.elements()) {
WasmYAML::ElemSegment Seg;
Seg.TableIndex = Segment.TableIndex;
@@ -323,7 +323,7 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
break;
}
case wasm::WASM_SEC_CODE: {
- auto CodeSec = make_unique<WasmYAML::CodeSection>();
+ auto CodeSec = std::make_unique<WasmYAML::CodeSection>();
for (auto &Func : Obj.functions()) {
WasmYAML::Function Function;
Function.Index = Func.Index;
@@ -340,7 +340,7 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
break;
}
case wasm::WASM_SEC_DATA: {
- auto DataSec = make_unique<WasmYAML::DataSection>();
+ auto DataSec = std::make_unique<WasmYAML::DataSection>();
for (const object::WasmSegment &Segment : Obj.dataSegments()) {
WasmYAML::DataSegment Seg;
Seg.SectionOffset = Segment.SectionOffset;
@@ -354,7 +354,7 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
break;
}
case wasm::WASM_SEC_DATACOUNT: {
- auto DataCountSec = make_unique<WasmYAML::DataCountSection>();
+ auto DataCountSec = std::make_unique<WasmYAML::DataCountSection>();
DataCountSec->Count = Obj.dataSegments().size();
S = std::move(DataCountSec);
break;
OpenPOWER on IntegriCloud