mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-05 17:39:16 +00:00
Fix the build with MSVC 2013 by explicitly requesting llvm::make_unique
MSVC 2013 provides std::make_unique, which it finds with ADL when one of the parameters is std::unique_ptr, leading to an ambiguous overload. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207597 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d17f593e72
commit
fc288c8339
@ -187,21 +187,25 @@ RuntimeDyldELF::createObjectImageFromFile(std::unique_ptr<object::ObjectFile> Ob
|
||||
MemoryBuffer::getMemBuffer(ObjFile->getData(), "", false);
|
||||
|
||||
if (ObjFile->getBytesInAddress() == 4 && ObjFile->isLittleEndian()) {
|
||||
auto Obj = make_unique<DyldELFObject<ELFType<support::little, 2, false>>>(std::move(ObjFile), Buffer, ec);
|
||||
auto Obj =
|
||||
llvm::make_unique<DyldELFObject<ELFType<support::little, 2, false>>>(
|
||||
std::move(ObjFile), Buffer, ec);
|
||||
return new ELFObjectImage<ELFType<support::little, 2, false>>(
|
||||
nullptr, std::move(Obj));
|
||||
} else if (ObjFile->getBytesInAddress() == 4 && !ObjFile->isLittleEndian()) {
|
||||
auto Obj = make_unique<DyldELFObject<ELFType<support::big, 2, false>>>(
|
||||
std::move(ObjFile), Buffer, ec);
|
||||
auto Obj =
|
||||
llvm::make_unique<DyldELFObject<ELFType<support::big, 2, false>>>(
|
||||
std::move(ObjFile), Buffer, ec);
|
||||
return new ELFObjectImage<ELFType<support::big, 2, false>>(nullptr, std::move(Obj));
|
||||
} else if (ObjFile->getBytesInAddress() == 8 && !ObjFile->isLittleEndian()) {
|
||||
auto Obj = make_unique<DyldELFObject<ELFType<support::big, 2, true>>>(
|
||||
auto Obj = llvm::make_unique<DyldELFObject<ELFType<support::big, 2, true>>>(
|
||||
std::move(ObjFile), Buffer, ec);
|
||||
return new ELFObjectImage<ELFType<support::big, 2, true>>(nullptr,
|
||||
std::move(Obj));
|
||||
} else if (ObjFile->getBytesInAddress() == 8 && ObjFile->isLittleEndian()) {
|
||||
auto Obj = make_unique<DyldELFObject<ELFType<support::little, 2, true>>>(
|
||||
std::move(ObjFile), Buffer, ec);
|
||||
auto Obj =
|
||||
llvm::make_unique<DyldELFObject<ELFType<support::little, 2, true>>>(
|
||||
std::move(ObjFile), Buffer, ec);
|
||||
return new ELFObjectImage<ELFType<support::little, 2, true>>(
|
||||
nullptr, std::move(Obj));
|
||||
} else
|
||||
@ -217,27 +221,27 @@ ObjectImage *RuntimeDyldELF::createObjectImage(ObjectBuffer *Buffer) {
|
||||
error_code ec;
|
||||
|
||||
if (Ident.first == ELF::ELFCLASS32 && Ident.second == ELF::ELFDATA2LSB) {
|
||||
auto Obj = make_unique<DyldELFObject<ELFType<support::little, 4, false>>>(
|
||||
Buffer->getMemBuffer(), ec);
|
||||
auto Obj =
|
||||
llvm::make_unique<DyldELFObject<ELFType<support::little, 4, false>>>(
|
||||
Buffer->getMemBuffer(), ec);
|
||||
return new ELFObjectImage<ELFType<support::little, 4, false>>(
|
||||
Buffer, std::move(Obj));
|
||||
} else if (Ident.first == ELF::ELFCLASS32 &&
|
||||
Ident.second == ELF::ELFDATA2MSB) {
|
||||
auto Obj =
|
||||
make_unique<DyldELFObject<ELFType<support::big, 4, false>>>(
|
||||
llvm::make_unique<DyldELFObject<ELFType<support::big, 4, false>>>(
|
||||
Buffer->getMemBuffer(), ec);
|
||||
return new ELFObjectImage<ELFType<support::big, 4, false>>(Buffer,
|
||||
std::move(Obj));
|
||||
} else if (Ident.first == ELF::ELFCLASS64 &&
|
||||
Ident.second == ELF::ELFDATA2MSB) {
|
||||
auto Obj =
|
||||
make_unique<DyldELFObject<ELFType<support::big, 8, true>>>(
|
||||
Buffer->getMemBuffer(), ec);
|
||||
auto Obj = llvm::make_unique<DyldELFObject<ELFType<support::big, 8, true>>>(
|
||||
Buffer->getMemBuffer(), ec);
|
||||
return new ELFObjectImage<ELFType<support::big, 8, true>>(Buffer, std::move(Obj));
|
||||
} else if (Ident.first == ELF::ELFCLASS64 &&
|
||||
Ident.second == ELF::ELFDATA2LSB) {
|
||||
auto Obj =
|
||||
make_unique<DyldELFObject<ELFType<support::little, 8, true>>>(
|
||||
llvm::make_unique<DyldELFObject<ELFType<support::little, 8, true>>>(
|
||||
Buffer->getMemBuffer(), ec);
|
||||
return new ELFObjectImage<ELFType<support::little, 8, true>>(Buffer, std::move(Obj));
|
||||
} else
|
||||
|
Loading…
x
Reference in New Issue
Block a user