LTO: Export functions referenced by non-canonical CFI jump tables
authorSami Tolvanen <samitolvanen@google.com>
Tue, 8 Jun 2021 21:57:32 +0000 (14:57 -0700)
committerNick Desaulniers <ndesaulniers@google.com>
Tue, 8 Jun 2021 21:57:43 +0000 (14:57 -0700)
commit2f9ba6aa8b6d805728b5df42b7b049b3c23d28a2
tree71f99e8c7157d615f49f6123a965720341d42bad
parent9b022a679b2ba79b8c7d11135b9297f0149f1433
LTO: Export functions referenced by non-canonical CFI jump tables

LowerTypeTests pass adds functions with a non-canonical jump table
to cfiFunctionDecls instead of cfiFunctionDefs. As the jump table
is in the regular LTO object, these functions will also need to be
exported. This change fixes the non-canonical jump table case and
adds a test similar to the existing one for canonical jump tables.

Reviewed By: pcc

Differential Revision: https://reviews.llvm.org/D103120
llvm/lib/LTO/LTO.cpp
llvm/test/LTO/Resolution/X86/export-jumptable-noncanonical.ll [new file with mode: 0644]