Add a RAW mode to StringTableBuilder.
authorRafael Espindola <rafael.espindola@gmail.com>
Fri, 23 Oct 2015 21:48:05 +0000 (21:48 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Fri, 23 Oct 2015 21:48:05 +0000 (21:48 +0000)
commit715bccae4a4a70340333ea0645553d497736d7f7
tree5f6c480822478db5fe630ca481e2cbb4e1f59cec
parent15eca1fa30e0cd700a0d5c858cb9d52b2e190272
Add a RAW mode to StringTableBuilder.

In this mode it just tries to tail merge the strings without imposing any other
format constrains. It will not, for example, add a null byte between them.

Also add support for keeping a tentative size and offset if we decide to
not optimize after all.

This will be used shortly in lld for merging SHF_STRINGS sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251153 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCMachObjectWriter.h
include/llvm/MC/StringTableBuilder.h
lib/MC/ELFObjectWriter.cpp
lib/MC/MachObjectWriter.cpp
lib/MC/StringTableBuilder.cpp
lib/MC/WinCOFFObjectWriter.cpp
tools/yaml2obj/yaml2elf.cpp
unittests/MC/StringTableBuilderTest.cpp