summaryrefslogtreecommitdiffstats
path: root/lld/ELF/InputFiles.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/InputFiles.cpp')
-rw-r--r--lld/ELF/InputFiles.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index 8256b3bfd9a..4d11f359374 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -268,8 +268,8 @@ elf::ObjectFile<ELFT>::createInputSection(const Elf_Shdr &Sec) {
// A MIPS object file has a special section that contains register
// usage info, which needs to be handled by the linker specially.
if (Config->EMachine == EM_MIPS && Name == ".reginfo") {
- MipsReginfo = new (Alloc) MipsReginfoInputSection<ELFT>(this, &Sec);
- return MipsReginfo;
+ MipsReginfo.reset(new MipsReginfoInputSection<ELFT>(this, &Sec));
+ return MipsReginfo.get();
}
// We dont need special handling of .eh_frame sections if relocatable
OpenPOWER on IntegriCloud