]> granicus.if.org Git - llvm/commit
DebugInfo: Test linkonce-odr functions under LTO.
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 26 May 2014 06:44:52 +0000 (06:44 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 26 May 2014 06:44:52 +0000 (06:44 +0000)
commitbcc96923e014dbd496ae29f67629c62f45ec653c
tree4972ad659fa993d344a4574120c1e5e74e464f36
parent041b4abc735b5a32e1ff2da376a87295d4d25410
DebugInfo: Test linkonce-odr functions under LTO.

This was previously regressed/broken by r192749 (reverted due to this
issue in r192938) and I was about to break it again by accident with
some more invasive changes that deal with the subprogram lists. So to
avoid that and further issues - here's a test.

It's a pretty basic test - in both r192749 and my impending case, this
test would crash, but checking the basics (that we put a subprogram in
just one of the two CUs) seems like a good start.

We still get this wrong in weird ways if the linkonce-odr function
happens to not be identical in the metadata (because it's defined in two
different files (hence the # line directives in this test), etc) even
though it meets the language requirements (identical token stream) for
such a thing. That results in two subprogram DIEs, but only one of them
gets the parameter and high/low pc information, etc. We probably need to
use the DIRef infrastructure to deduplicate functions as we do types to
address this issue - or perhaps teach the BC linker to remove the
duplicate entries in subprogram lists?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209614 91177308-0d34-0410-b5e6-96231b3b80d8
test/DebugInfo/cross-cu-linkonce.ll [new file with mode: 0644]