mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 03:56:16 +08:00
Fix the last leak asan found in test/ELF.
llvm-svn: 256316
This commit is contained in:
@@ -233,12 +233,14 @@ void elf2::ObjectFile<ELFT>::initializeSections(DenseSet<StringRef> &Comdats) {
|
||||
if (Name == ".note.GNU-stack")
|
||||
Sections[I] = &InputSection<ELFT>::Discarded;
|
||||
else if (Name == ".eh_frame")
|
||||
Sections[I] = new (this->Alloc) EHInputSection<ELFT>(this, &Sec);
|
||||
Sections[I] =
|
||||
new (this->EHAlloc.Allocate()) EHInputSection<ELFT>(this, &Sec);
|
||||
else if (Name == ".reginfo")
|
||||
Sections[I] =
|
||||
new (this->Alloc) MipsReginfoInputSection<ELFT>(this, &Sec);
|
||||
else if (shouldMerge<ELFT>(Sec))
|
||||
Sections[I] = new (this->MAlloc.Allocate()) MergeInputSection<ELFT>(this, &Sec);
|
||||
Sections[I] =
|
||||
new (this->MAlloc.Allocate()) MergeInputSection<ELFT>(this, &Sec);
|
||||
else
|
||||
Sections[I] = new (this->Alloc) InputSection<ELFT>(this, &Sec);
|
||||
break;
|
||||
|
||||
@@ -136,6 +136,7 @@ private:
|
||||
|
||||
llvm::BumpPtrAllocator Alloc;
|
||||
llvm::SpecificBumpPtrAllocator<MergeInputSection<ELFT>> MAlloc;
|
||||
llvm::SpecificBumpPtrAllocator<EHInputSection<ELFT>> EHAlloc;
|
||||
};
|
||||
|
||||
class ArchiveFile : public InputFile {
|
||||
|
||||
Reference in New Issue
Block a user