Fix debug line info for macro expansions.
Macro expansions produce code tagged with debug locations that are completely different from the surrounding expressions. This wrecks havoc on debugger's ability the step over source lines. In order to have a good line stepping behavior in debugger, we overwrite debug locations of macro expansions with that of the outermost expansion site.
This commit is contained in:
@@ -521,6 +521,15 @@ extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreateLexicalBlock(
|
||||
));
|
||||
}
|
||||
|
||||
extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreateLexicalBlockFile(
|
||||
LLVMRustDIBuilderRef Builder,
|
||||
LLVMRustMetadataRef Scope,
|
||||
LLVMRustMetadataRef File) {
|
||||
return wrap(Builder->createLexicalBlockFile(
|
||||
unwrapDI<DIDescriptor>(Scope),
|
||||
unwrapDI<DIFile>(File)));
|
||||
}
|
||||
|
||||
extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreateStaticVariable(
|
||||
LLVMRustDIBuilderRef Builder,
|
||||
LLVMRustMetadataRef Context,
|
||||
|
||||
Reference in New Issue
Block a user