]> granicus.if.org Git - clang/commit
[CodeGen] Add alias for cpu_dispatch function with IFunc & Fix resolver linkage type
authorFangrui Song <maskray@google.com>
Wed, 11 Sep 2019 01:54:48 +0000 (01:54 +0000)
committerFangrui Song <maskray@google.com>
Wed, 11 Sep 2019 01:54:48 +0000 (01:54 +0000)
commitab17a97bef93694218125ebb2d004d89dd7dd487
tree129fd05f066feb8afcfdb40052896c58da01ae0b
parentb8a052bb7bf7bfe159d8885739cd906421d33d40
[CodeGen] Add alias for cpu_dispatch function with IFunc & Fix resolver linkage type

Multi-versioned functions defined by cpu_dispatch and implemented with IFunc
can not be called outside the translation units where they are defined due to
lack of symbols. This patch add function aliases for these functions and thus
make them visible outside.

Differential Revision: https://reviews.llvm.org/D67058
Patch by Senran Zhang

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@371586 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
lib/CodeGen/CodeGenModule.cpp
test/CodeGen/attr-cpuspecific.c
test/CodeGen/attr-target-mv-func-ptrs.c
test/CodeGen/attr-target-mv-va-args.c
test/CodeGen/attr-target-mv.c
test/CodeGenCXX/attr-cpuspecific.cpp
test/CodeGenCXX/attr-target-mv-diff-ns.cpp
test/CodeGenCXX/attr-target-mv-inalloca.cpp
test/CodeGenCXX/attr-target-mv-member-funcs.cpp
test/CodeGenCXX/attr-target-mv-modules.cpp
test/CodeGenCXX/attr-target-mv-out-of-line-defs.cpp
test/CodeGenCXX/attr-target-mv-overloads.cpp