[ThinLTO] Support cloning of temporary DILocation metadata
authorTeresa Johnson <tejohnson@google.com>
Mon, 7 Dec 2015 15:05:44 +0000 (15:05 +0000)
committerTeresa Johnson <tejohnson@google.com>
Mon, 7 Dec 2015 15:05:44 +0000 (15:05 +0000)
commitfda49fdbc8fadb4d3fdf839da37d8543085eb738
tree476644d8a58a79e134fef0bbee6931734202d072
parent3b45f263c3669c65a76f7033ee24093a9870cfcf
[ThinLTO] Support cloning of temporary DILocation metadata

This is needed to support linking of module-level metadata as a
postpass after function importing, where we will be leaving temporary
metadata on imported instructions until the postpass metadata import.

Also added unittest. Split from D14838.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254914 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/DebugInfoMetadata.h
unittests/IR/MetadataTest.cpp