mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 07:24:25 +00:00
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
This commit is contained in:
@ -564,7 +564,13 @@ namespace llvm {
|
||||
DIFile F = getFieldAs<DIFile>(3);
|
||||
return F.getCompileUnit();
|
||||
}
|
||||
unsigned getLineNumber() const { return getUnsignedField(4); }
|
||||
unsigned getLineNumber() const {
|
||||
return (getUnsignedField(4) << 8) >> 8;
|
||||
}
|
||||
unsigned getArgNumber() const {
|
||||
unsigned L = getUnsignedField(4);
|
||||
return L >> 24;
|
||||
}
|
||||
DIType getType() const { return getFieldAs<DIType>(5); }
|
||||
|
||||
/// isArtificial - Return true if this variable is marked as "artificial".
|
||||
|
Reference in New Issue
Block a user