Table of Contents

Method InsertDeclare

Namespace
Ubiquity.NET.Llvm.DebugInfo
Assembly
Ubiquity.NET.Llvm.dll

InsertDeclare(Value, DILocalVariable, DILocation, Instruction)

Inserts an declare debug record for the given instruction

public DebugRecord InsertDeclare(Value storage, DILocalVariable varInfo, DILocation location, Instruction insertBefore)

Parameters

storage Value

Value the declaration is bound to

varInfo DILocalVariable

DILocalVariable for storage

location DILocation

DILocationfor the variable

insertBefore Instruction

Instruction to insert the declaration before

Returns

DebugRecord

CallInstruction for the call to llvm.dbg.declare

Remarks

This adds a call to the llvm.dbg.declare intrinsic. The call has no impact on the actual machine code generated, as it is removed or ignored for actual target instruction selection. Instead this provides a means to bind the LLVM Debug information metadata to a particular LLVM Value that allows the transformation and optimization passes to track the debug information. Thus, even with optimized code the actual debug information is retained.

See Also

InsertDeclare(Value, DILocalVariable, DIExpression, DILocation, Instruction)

Inserts an llvm.dbg.declare instruction before the given instruction

public DebugRecord InsertDeclare(Value storage, DILocalVariable varInfo, DIExpression expression, DILocation location, Instruction insertBefore)

Parameters

storage Value

Value the declaration is bound to

varInfo DILocalVariable

DILocalVariable for storage

expression DIExpression

DIExpression for a debugger to use when extracting the value

location DILocation

DILocationfor the variable

insertBefore Instruction

Instruction to insert the declaration before

Returns

DebugRecord

CallInstruction for the call to llvm.dbg.declare

Remarks

This adds a call to the llvm.dbg.declare intrinsic. The call has no impact on the actual machine code generated, as it is removed or ignored for actual target instruction selection. Instead this provides a means to bind the LLVM Debug information metadata to a particular LLVM Value that allows the transformation and optimization passes to track the debug information. Thus, even with optimized code the actual debug information is retained.

See Also

InsertDeclare(Value, DILocalVariable, DILocation, BasicBlock)

Inserts a DebugRecord before the given instruction

public DebugRecord InsertDeclare(Value storage, DILocalVariable varInfo, DILocation location, BasicBlock insertAtEnd)

Parameters

storage Value

Value the declaration is bound to

varInfo DILocalVariable

DILocalVariable for storage

location DILocation

DILocationfor the variable

insertAtEnd BasicBlock

BasicBlock to insert the declaration at the end of

Returns

DebugRecord

CallInstruction for the call to llvm.dbg.declare

Remarks

This adds a call to the llvm.dbg.declare intrinsic. The call has no impact on the actual machine code generated, as it is removed or ignored for actual target instruction selection. Instead this provides a means to bind the LLVM Debug information metadata to a particular LLVM Value that allows the transformation and optimization passes to track the debug information. Thus, even with optimized code the actual debug information is retained.

See Also

InsertDeclare(Value, DILocalVariable, DIExpression, DILocation, BasicBlock)

Inserts a debug record before the given instruction

public DebugRecord InsertDeclare(Value storage, DILocalVariable varInfo, DIExpression expression, DILocation location, BasicBlock insertAtEnd)

Parameters

storage Value

Value the declaration is bound to

varInfo DILocalVariable

DILocalVariable for storage

expression DIExpression

DIExpression for a debugger to use when extracting the value

location DILocation

DILocationfor the variable

insertAtEnd BasicBlock

BasicBlock to insert the declaration at the end of

Returns

DebugRecord

CallInstruction for the call to llvm.dbg.declare

Remarks

This adds a call to the llvm.dbg.declare intrinsic.

note

The call has no impact on the actual machine code generated, as it is removed or ignored for actual target instruction selection. Instead this provides a means to bind the LLVM Debug information metadata to a particular LLVM Value that allows the transformation and optimization passes to track the debug information. Thus, even with optimized code the actual debug information is retained.

See Also