ArgumentPromotion should copy all metadata to new Function

ArgumentPromotion had code to specifically move the dbg metadata over to
the new function, but other metadata such as the function_entry_count
!prof metadata was not. Replace code that moved dbg metadata with a call
to copyMetadata. The old metadata is automatically removed when the old
Function is removed.

Reviewers: davidxl

Subscribers: llvm-commits

Tags: #llvm

Differential Revision:

git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed