mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-17 05:24:49 +00:00
Use make<> instead of new (BAlloc). NFC.
We converted them before, but there were a few remaining occurrences. llvm-svn: 296510
This commit is contained in:
parent
80474a26b9
commit
175e81cf3a
@ -511,11 +511,10 @@ SymbolBody *elf::ObjectFile<ELFT>::createSymbolBody(const Elf_Sym *Sym) {
|
||||
|
||||
StringRefZ Name = this->StringTable.data() + Sym->st_name;
|
||||
if (Sym->st_shndx == SHN_UNDEF)
|
||||
return new (BAlloc)
|
||||
Undefined(Name, /*IsLocal=*/true, StOther, Type, this);
|
||||
return make<Undefined>(Name, /*IsLocal=*/true, StOther, Type, this);
|
||||
|
||||
return new (BAlloc) DefinedRegular(Name, /*IsLocal=*/true, StOther, Type,
|
||||
Value, Size, Sec, this);
|
||||
return make<DefinedRegular>(Name, /*IsLocal=*/true, StOther, Type, Value,
|
||||
Size, Sec, this);
|
||||
}
|
||||
|
||||
StringRef Name = check(Sym->getName(this->StringTable));
|
||||
|
@ -191,7 +191,7 @@ std::pair<Symbol *, bool> SymbolTable<ELFT>::insert(StringRef Name) {
|
||||
|
||||
Symbol *Sym;
|
||||
if (IsNew) {
|
||||
Sym = new (BAlloc) Symbol;
|
||||
Sym = make<Symbol>();
|
||||
Sym->InVersionScript = false;
|
||||
Sym->Binding = STB_WEAK;
|
||||
Sym->Visibility = STV_DEFAULT;
|
||||
|
@ -533,11 +533,11 @@ template <class ELFT> void Writer<ELFT>::addSectionSymbols() {
|
||||
if (!IS || isa<SyntheticSection>(IS) || IS->Type == SHT_REL ||
|
||||
IS->Type == SHT_RELA)
|
||||
continue;
|
||||
auto *B = new (BAlloc)
|
||||
DefinedRegular("", /*IsLocal=*/true, /*StOther*/ 0, STT_SECTION,
|
||||
/*Value*/ 0, /*Size*/ 0, IS, nullptr);
|
||||
|
||||
In<ELFT>::SymTab->addSymbol(B);
|
||||
auto *Sym =
|
||||
make<DefinedRegular>("", /*IsLocal=*/true, /*StOther=*/0, STT_SECTION,
|
||||
/*Value=*/0, /*Size=*/0, IS, nullptr);
|
||||
In<ELFT>::SymTab->addSymbol(Sym);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user