diff options
author | Sami Tolvanen <samitolvanen@google.com> | 2021-06-08 14:57:32 -0700 |
---|---|---|
committer | Nick Desaulniers <ndesaulniers@google.com> | 2021-06-08 14:57:43 -0700 |
commit | 2f9ba6aa8b6d805728b5df42b7b049b3c23d28a2 (patch) | |
tree | 71f99e8c7157d615f49f6123a965720341d42bad /llvm/lib/LTO/LTO.cpp | |
parent | 9b022a679b2ba79b8c7d11135b9297f0149f1433 (diff) | |
download | llvm-2f9ba6aa8b6d805728b5df42b7b049b3c23d28a2.zip llvm-2f9ba6aa8b6d805728b5df42b7b049b3c23d28a2.tar.gz llvm-2f9ba6aa8b6d805728b5df42b7b049b3c23d28a2.tar.bz2 |
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
Diffstat (limited to 'llvm/lib/LTO/LTO.cpp')
-rw-r--r-- | llvm/lib/LTO/LTO.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp index d594c19..69d500b 100644 --- a/llvm/lib/LTO/LTO.cpp +++ b/llvm/lib/LTO/LTO.cpp @@ -1480,6 +1480,9 @@ Error LTO::runThinLTO(AddStreamFn AddStream, NativeObjectCache Cache, for (auto &Def : ThinLTO.CombinedIndex.cfiFunctionDefs()) ExportedGUIDs.insert( GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Def))); + for (auto &Decl : ThinLTO.CombinedIndex.cfiFunctionDecls()) + ExportedGUIDs.insert( + GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Decl))); auto isExported = [&](StringRef ModuleIdentifier, ValueInfo VI) { const auto &ExportList = ExportLists.find(ModuleIdentifier); |