diff options
Diffstat (limited to 'lld/lib')
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/Mips/MipsELFFile.h | 4 | ||||
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/Mips/MipsLinkingContext.cpp | 2 | ||||
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp | 6 |
3 files changed, 5 insertions, 7 deletions
diff --git a/lld/lib/ReaderWriter/ELF/Mips/MipsELFFile.h b/lld/lib/ReaderWriter/ELF/Mips/MipsELFFile.h index c9330317070..49dcc931cbf 100644 --- a/lld/lib/ReaderWriter/ELF/Mips/MipsELFFile.h +++ b/lld/lib/ReaderWriter/ELF/Mips/MipsELFFile.h @@ -13,6 +13,7 @@ #include "MipsLinkingContext.h" #include "MipsReginfo.h" #include "MipsRelocationHandler.h" +#include "llvm/ADT/STLExtras.h" namespace lld { namespace elf { @@ -92,8 +93,7 @@ public: static ErrorOr<std::unique_ptr<MipsELFFile>> create(std::unique_ptr<MemoryBuffer> mb, MipsLinkingContext &ctx) { - return std::unique_ptr<MipsELFFile<ELFT>>( - new MipsELFFile<ELFT>(std::move(mb), ctx)); + return llvm::make_unique<MipsELFFile<ELFT>>(std::move(mb), ctx); } bool isPIC() const { diff --git a/lld/lib/ReaderWriter/ELF/Mips/MipsLinkingContext.cpp b/lld/lib/ReaderWriter/ELF/Mips/MipsLinkingContext.cpp index 8362dd54838..a68c19ddc22 100644 --- a/lld/lib/ReaderWriter/ELF/Mips/MipsLinkingContext.cpp +++ b/lld/lib/ReaderWriter/ELF/Mips/MipsLinkingContext.cpp @@ -20,7 +20,7 @@ std::unique_ptr<ELFLinkingContext> MipsLinkingContext::create(llvm::Triple triple) { if (triple.getArch() == llvm::Triple::mipsel || triple.getArch() == llvm::Triple::mips64el) - return std::unique_ptr<ELFLinkingContext>(new MipsLinkingContext(triple)); + return llvm::make_unique<MipsLinkingContext>(triple); return nullptr; } diff --git a/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp b/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp index 045f614833e..6d88b9b28de 100644 --- a/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp +++ b/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp @@ -599,15 +599,13 @@ namespace elf { template <> std::unique_ptr<TargetRelocationHandler> createMipsRelocationHandler<Mips32ELType>(MipsLinkingContext &ctx) { - return std::unique_ptr<TargetRelocationHandler>( - new RelocationHandler<Mips32ELType>(ctx)); + return llvm::make_unique<RelocationHandler<Mips32ELType>>(ctx); } template <> std::unique_ptr<TargetRelocationHandler> createMipsRelocationHandler<Mips64ELType>(MipsLinkingContext &ctx) { - return std::unique_ptr<TargetRelocationHandler>( - new RelocationHandler<Mips64ELType>(ctx)); + return llvm::make_unique<RelocationHandler<Mips64ELType>>(ctx); } } // elf |

