mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
WinCOFFObjectWriter: optimize the string table for common suffices
This is a follow-up from r207670 which did the same for ELF. Differential Revision: http://reviews.llvm.org/D5530 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218636 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1073,7 +1073,7 @@ ELFObjectWriter::computeSymbolTable(MCAssembler &Asm, const MCAsmLayout &Layout,
|
||||
for (auto i = Asm.file_names_begin(), e = Asm.file_names_end(); i != e; ++i)
|
||||
StrTabBuilder.add(*i);
|
||||
|
||||
StrTabBuilder.finalize();
|
||||
StrTabBuilder.finalize(StringTableBuilder::ELF);
|
||||
|
||||
for (auto i = Asm.file_names_begin(), e = Asm.file_names_end(); i != e; ++i)
|
||||
FileSymbolData.push_back(StrTabBuilder.getOffset(*i));
|
||||
@@ -1446,7 +1446,7 @@ void ELFObjectWriter::CreateMetadataSections(MCAssembler &Asm,
|
||||
static_cast<const MCSectionELF&>(it->getSection());
|
||||
ShStrTabBuilder.add(Section.getSectionName());
|
||||
}
|
||||
ShStrTabBuilder.finalize();
|
||||
ShStrTabBuilder.finalize(StringTableBuilder::ELF);
|
||||
F->getContents().append(ShStrTabBuilder.data().begin(),
|
||||
ShStrTabBuilder.data().end());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user