]> granicus.if.org Git - llvm/commit
LTO: Export functions referenced by the CFI jump table.
authorPeter Collingbourne <peter@pcc.me.uk>
Wed, 19 Jul 2017 18:18:19 +0000 (18:18 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Wed, 19 Jul 2017 18:18:19 +0000 (18:18 +0000)
commitdba60ce821fb360874d1b4cad96c0b0592e9479f
tree9add2f27b69a751ce56fd1e7b528d60a08279653
parent627b94c08c02f36217310bd514d429effd0ad3c3
LTO: Export functions referenced by the CFI jump table.

If the LowerTypeTests pass decides to add a function to a jump
table for CFI, it will add its name to the set cfiFunctionDefs,
which among other things will cause the function to be renamed in
the ThinLTO backend.

One other thing that we must do with such functions is to not
internalize them, because the jump table in the full LTO object will
contain a reference to the actual function body in the ThinLTO object.

This patch handles that by ensuring that we export any functions
whose names appear in the cfiFunctionDefs set.

Fixes PR33831.

Differential Revision: https://reviews.llvm.org/D35605

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308504 91177308-0d34-0410-b5e6-96231b3b80d8
lib/LTO/LTO.cpp
test/LTO/Resolution/X86/export-jumptable.ll [new file with mode: 0644]