[CGProfile] allows bitcast in metadata node storing function pointers
authorYuanfang Chen <yuanfang.chen@sony.com>
Fri, 13 Nov 2020 17:27:10 +0000 (09:27 -0800)
committerYuanfang Chen <yuanfang.chen@sony.com>
Fri, 13 Nov 2020 17:28:21 +0000 (09:28 -0800)
commita223354161104c25f9c6663b66222bd5e1d532cd
treec3cf23574c83b9aaff898f0fce0e123c5003f467
parentb184a2eccf3b80eb3ab741e983d4637111942815
[CGProfile] allows bitcast in metadata node storing function pointers

For example,  during RAUW in IRMover, the `Function` ValueAsMetadata in "CG Profile" could become bitcast.

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D88433
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm/lib/IR/Verifier.cpp
llvm/test/Transforms/FunctionImport/Inputs/cg_profile.ll [new file with mode: 0644]
llvm/test/Transforms/FunctionImport/cg_profile.ll [new file with mode: 0644]