[MachineOutliner] Add DISubprograms to outlined functions.
authorJessica Paquette <jpaquette@apple.com>
Thu, 18 Jan 2018 00:00:58 +0000 (00:00 +0000)
committerJessica Paquette <jpaquette@apple.com>
Thu, 18 Jan 2018 00:00:58 +0000 (00:00 +0000)
commit729e68693f3618a219f9737d056046ea0b55ff11
treedb49a0932b1e30e61b672d2d1d52e6a0e06c0475
parent1aa9061c5f4c2697bc15c73bdb465d967fc20b11
[MachineOutliner] Add DISubprograms to outlined functions.

Before, it wasn't possible to get backtraces inside outlined functions. This
commit adds DISubprograms to the IR functions created by the outliner which
makes this possible. Also attached a test that ensures that the produced
debug information is correct. This is useful to users that want to debug
outlined code.

llvm-svn: 322789
llvm/lib/CodeGen/MachineOutliner.cpp
llvm/test/CodeGen/X86/machine-outliner-disubprogram.ll [new file with mode: 0644]