From fc288c83394800c2eb3e6627cd52f72d5f997b4a Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Tue, 29 Apr 2014 23:54:52 +0000 Subject: 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 --- lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 30 ++++++++++++---------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'lib/ExecutionEngine') diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index 41ae701048..6e7c91f6be 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp @@ -187,21 +187,25 @@ RuntimeDyldELF::createObjectImageFromFile(std::unique_ptr Ob MemoryBuffer::getMemBuffer(ObjFile->getData(), "", false); if (ObjFile->getBytesInAddress() == 4 && ObjFile->isLittleEndian()) { - auto Obj = make_unique>>(std::move(ObjFile), Buffer, ec); + auto Obj = + llvm::make_unique>>( + std::move(ObjFile), Buffer, ec); return new ELFObjectImage>( nullptr, std::move(Obj)); } else if (ObjFile->getBytesInAddress() == 4 && !ObjFile->isLittleEndian()) { - auto Obj = make_unique>>( - std::move(ObjFile), Buffer, ec); + auto Obj = + llvm::make_unique>>( + std::move(ObjFile), Buffer, ec); return new ELFObjectImage>(nullptr, std::move(Obj)); } else if (ObjFile->getBytesInAddress() == 8 && !ObjFile->isLittleEndian()) { - auto Obj = make_unique>>( + auto Obj = llvm::make_unique>>( std::move(ObjFile), Buffer, ec); return new ELFObjectImage>(nullptr, std::move(Obj)); } else if (ObjFile->getBytesInAddress() == 8 && ObjFile->isLittleEndian()) { - auto Obj = make_unique>>( - std::move(ObjFile), Buffer, ec); + auto Obj = + llvm::make_unique>>( + std::move(ObjFile), Buffer, ec); return new ELFObjectImage>( 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>>( - Buffer->getMemBuffer(), ec); + auto Obj = + llvm::make_unique>>( + Buffer->getMemBuffer(), ec); return new ELFObjectImage>( Buffer, std::move(Obj)); } else if (Ident.first == ELF::ELFCLASS32 && Ident.second == ELF::ELFDATA2MSB) { auto Obj = - make_unique>>( + llvm::make_unique>>( Buffer->getMemBuffer(), ec); return new ELFObjectImage>(Buffer, std::move(Obj)); } else if (Ident.first == ELF::ELFCLASS64 && Ident.second == ELF::ELFDATA2MSB) { - auto Obj = - make_unique>>( - Buffer->getMemBuffer(), ec); + auto Obj = llvm::make_unique>>( + Buffer->getMemBuffer(), ec); return new ELFObjectImage>(Buffer, std::move(Obj)); } else if (Ident.first == ELF::ELFCLASS64 && Ident.second == ELF::ELFDATA2LSB) { auto Obj = - make_unique>>( + llvm::make_unique>>( Buffer->getMemBuffer(), ec); return new ELFObjectImage>(Buffer, std::move(Obj)); } else -- cgit v1.2.3