-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
This is a known problem from #43370, but I feel it deserves its own issue. When using rustc compiled with LLVM 5.0.1, compiling with debuginfo often prints "invalid expression" messages to stderr, and AFAICT affected functions don't get any debuginfo written at all. For example:
$ cat foo.rs
fn main() {
(0..10).for_each(|i| println!("{}", i));
}
$ rustc -g foo.rs
invalid expression
!40 = !DIExpression(6, 34, 0)
Previous analysis in #43370 tied it to this declare_local
call, and @eddyb offered a possible solution in #43370 (comment).
LinusU
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.