diff options
| author | Rong Xu <xur@google.com> | 2016-10-06 20:38:13 +0000 |
|---|---|---|
| committer | Rong Xu <xur@google.com> | 2016-10-06 20:38:13 +0000 |
| commit | 0e79f7d11d6a76c8509554bde344d0270fea814d (patch) | |
| tree | 2741e609b578b92128fe2a4d7cae51e2d2d5ae0c /llvm/test | |
| parent | c26d97401c85386a8171cee3a45ee4dafd20de97 (diff) | |
| download | bcm5719-llvm-0e79f7d11d6a76c8509554bde344d0270fea814d.tar.gz bcm5719-llvm-0e79f7d11d6a76c8509554bde344d0270fea814d.zip | |
[PGO] Create weak alias for the renamed Comdat function
Add a weak alias to the renamed Comdat function in IR level instrumentation,
using it's original name. This ensures the same behavior w/ and w/o IR
instrumentation, even for non standard conforming code.
Differential Revision: http://reviews.llvm.org/D25339
llvm-svn: 283490
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/Transforms/PGOProfile/comdat_rename.ll | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/test/Transforms/PGOProfile/comdat_rename.ll b/llvm/test/Transforms/PGOProfile/comdat_rename.ll index 63bb367fda2..b69c802093b 100644 --- a/llvm/test/Transforms/PGOProfile/comdat_rename.ll +++ b/llvm/test/Transforms/PGOProfile/comdat_rename.ll @@ -50,6 +50,12 @@ define linkonce_odr void @f_with_alias() comdat($f_with_alias) { ; Rename AvailableExternallyLinkage functions ; ELFONLY-DAG: $aef.[[SINGLEBB_HASH]] = comdat any + +; ELFONLY: @f = weak alias void (), void ()* @f.[[SINGLEBB_HASH]] +; ELFONLY: @f_with_alias = weak alias void (), void ()* @f_with_alias.[[SINGLEBB_HASH]] +; ELFONLY: @af = weak alias void (...), void (...)* @af.[[SINGLEBB_HASH]] +; ELFONLY: @aef = weak alias void (), void ()* @aef.[[SINGLEBB_HASH]] + define available_externally void @aef() { ; ELFONLY: define linkonce_odr void @aef.[[SINGLEBB_HASH]]() comdat { ; COFFONLY: define available_externally void @aef() { |

