MapMetadata: Allow unresolved metadata if it won't change
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 17 Mar 2015 01:14:40 +0000 (01:14 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 17 Mar 2015 01:14:40 +0000 (01:14 +0000)
commited1d6bdfbdd1276c84b691bf74ec3d96042e1d88
tree34404a0cc233027b6641057da6d46158b6859ec2
parent58d23818683f43a2699b48963584fb52f7baa08e
MapMetadata: Allow unresolved metadata if it won't change

Allow unresolved nodes through the `MapMetadata()` if
`RF_NoModuleLevelChanges`, since there's no remapping to do anyway.

This fixes PR22929.  I'll add a clang test as a follow-up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232449 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/ValueMapper.cpp
unittests/Transforms/Utils/CMakeLists.txt
unittests/Transforms/Utils/ValueMapperTest.cpp [new file with mode: 0644]