ThinLTO: Fix inline assembly references to static functions with CFI
authorSami Tolvanen <samitolvanen@google.com>
Tue, 22 Jun 2021 16:28:31 +0000 (09:28 -0700)
committerSami Tolvanen <samitolvanen@google.com>
Tue, 22 Jun 2021 17:01:55 +0000 (10:01 -0700)
commit4474958d3a97dede2caa0920f7c4a4dc7aac57d3
tree3916e05c28204a907a54c73eb697c51251f54ba7
parentbd240b3d77c4157a99d029fa9fa431c53b748ef1
ThinLTO: Fix inline assembly references to static functions with CFI

Create an internal alias with the original name for static functions
that are renamed in promoteInternals to avoid breaking inline
assembly references to them.

Link: https://github.com/ClangBuiltLinux/linux/issues/1354
Reviewed By: pcc

Differential Revision: https://reviews.llvm.org/D104058
llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
llvm/test/Transforms/ThinLTOBitcodeWriter/cfi-icall-static-inline-asm.ll [new file with mode: 0644]