Put jump tables in unique sections on COFF.

If a function is going in an unique section (because of -ffunction-sections
for example), putting a jump table in .rodata will keep .rodata alive and
that will keep alive any other function that also has a jump table.

Instead, put the jump table in a unique section that is associated with the
function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231961 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2015-03-11 19:58:37 +00:00
parent 52f83a9ab3
commit 0c78583bf6
3 changed files with 35 additions and 0 deletions

View File

@ -147,6 +147,10 @@ public:
SectionKind Kind, Mangler &Mang,
const TargetMachine &TM) const override;
const MCSection *
getSectionForJumpTable(const Function &F, Mangler &Mang,
const TargetMachine &TM) const override;
/// Extract the dependent library name from a linker option string. Returns
/// StringRef() if the option does not specify a library.
StringRef getDepLibFromLinkerOpt(StringRef LinkerOption) const override;