Today, the language front ends produces llvm.dbg.* intrinsics, used to encode argumen...
authorDevang Patel <dpatel@apple.com>
Tue, 1 Mar 2011 22:58:13 +0000 (22:58 +0000)
committerDevang Patel <dpatel@apple.com>
Tue, 1 Mar 2011 22:58:13 +0000 (22:58 +0000)
commite9e16c5f52c4a093f4de234d448cdebedab8938e
tree30919eba1124cefad5813d264bfb9d0fb9e82131
parentd9f574b724a208ec38761e250d83fcc2480e685c
Today, the language front ends produces llvm.dbg.* intrinsics, used to encode arguments' debug info, in order any way, most of the times. However, if a front end mix-n-matches llvm.dbg.declare and llvm.dbg.value intrinsics to encode debug info for arguments then code generator needs a way to find argument order.

Use 8 bits from line number field to keep track of argument ordering while encoding debug info for an argument. That leaves 24 bit for line no, DebugLoc also allocates 24 bit for line numbers. If a function has more than 255 arguments then rest of the arguments will be ordered by llvm.dbg.* intrinsics' ordering in IR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126793 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/DIBuilder.h
include/llvm/Analysis/DebugInfo.h
lib/Analysis/DIBuilder.cpp