diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2016-08-25 13:52:52 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2016-08-25 17:07:59 +0530 |
| commit | e0e1954bdc1570d119deddc46be2087b73f62995 (patch) | |
| tree | e64a1fd4989f9681c1a4838586e5e877fdb73de2 /src/rustllvm/RustWrapper.cpp | |
| parent | f5499a001d9cbde6a672f9d393d9c80c63745f00 (diff) | |
| parent | cf6461168f5a784c996ffd6618d23f33113d2819 (diff) | |
| download | rust-e0e1954bdc1570d119deddc46be2087b73f62995.tar.gz rust-e0e1954bdc1570d119deddc46be2087b73f62995.zip | |
Rollup merge of #35238 - vadimcn:macro-debug-locs, r=michaelwoerister
Fix debug line number info for macro expansions. Macro expansions result in code tagged with completely different debug locations than the surrounding expressions. This wrecks havoc on debugger's ability the step over source lines. This change fixes the problem by tagging expanded code as "inlined" at the macro expansion site, which allows the debugger to sort it out. Note that only the outermost expansion is currently handled, stepping into a macro will still result in stepping craziness. r? @eddyb
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
| -rw-r--r-- | src/rustllvm/RustWrapper.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index 0da25e7ac57..82fb2b0918f 100644 --- a/src/rustllvm/RustWrapper.cpp +++ b/src/rustllvm/RustWrapper.cpp @@ -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, |
