Put jump tables in unique sections on COFF.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 11 Mar 2015 19:58:37 +0000 (19:58 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 11 Mar 2015 19:58:37 +0000 (19:58 +0000)
commitab447e436daf038e88a2a75a72b6d4a94a1516b2
treee26d0a1ffb7a52959509b48218e8c54994fcd40a
parent0d0a1a53e3870d1c816bec193841e9d2db1a1b68
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.

llvm-svn: 231961
llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm/test/CodeGen/X86/global-sections.ll