CodeGen: Fix MachineInstr::print() for DBG_VALUE
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 3 Apr 2015 16:23:04 +0000 (16:23 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 3 Apr 2015 16:23:04 +0000 (16:23 +0000)
commit2d2520986ead1d49503cbef0394c843a7adcc2b2
treee72135c7b9f44491d8fdb8da26e7b6eafc9cdd8b
parentefa23ae2a98a1898d819889197072b296438fc1c
CodeGen: Fix MachineInstr::print() for DBG_VALUE

Grab the `MDLocalVariable` from the second-to-last argument; the last
argument is an `MDExpression`, and mixing them up will crash.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234019 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineInstr.cpp
test/DebugInfo/X86/mi-print.ll [new file with mode: 0644]