DebugInfo: PR14763/r183329 correct the location of indirect parameters
authorDavid Blaikie <dblaikie@gmail.com>
Wed, 19 Jun 2013 21:55:13 +0000 (21:55 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 19 Jun 2013 21:55:13 +0000 (21:55 +0000)
commit0159ae4295720c5ce8fc770ddb5fed67e90b8d3a
treeea7ea8fc345440a39c8b9ee7d490c01d76e25cea
parent4f71c1b2b9b1195d6f5107c433e06dedc0a61d14
DebugInfo: PR14763/r183329 correct the location of indirect parameters

We had been papering over a problem with location info for non-trivial
types passed by value by emitting their type as references (this caused
the debugger to interpret the location information correctly, but broke
the type of the function). r183329 corrected the type information but
lead to the debugger interpreting the pointer parameter as the value -
the debug info describing the location needed an extra dereference.

Use a new flag in DIVariable to add the extra indirection (either by
promoting an existing DW_OP_reg (parameter passed in a register) to
DW_OP_breg + 0 or by adding DW_OP_deref to an existing DW_OP_breg + n
(parameter passed on the stack).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184368 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/AsmPrinter.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/Target/ARM/ARMAsmPrinter.cpp
lib/Target/ARM/ARMAsmPrinter.h
test/DebugInfo/X86/parameters.ll [new file with mode: 0644]