Open Quuxplusone opened 3 years ago
Bugzilla Link | PR52483 |
Status | NEW |
Importance | P enhancement |
Reported by | Theodore Wang (tlwang@uwaterloo.ca) |
Reported on | 2021-11-11 18:35:24 -0800 |
Last modified on | 2021-11-12 10:43:12 -0800 |
Version | trunk |
Hardware | PC All |
CC | cnsun@uwaterloo.ca, craig.topper@gmail.com, dblaikie@gmail.com, jeremy.morse.llvm@gmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, paul_robinson@playstation.sony.com, pengfei.wang@intel.com, spatel+llvm@rotateright.com |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
I think this is a front end issue. It crashes with -emit-llvm.
Yeah, /probably/ should just relax the verifier and allow this - GCC seems fine with using line 0 if the user asked for it like this.
(also, why are we complaining about the decl line/column on a lexical scope? We don't emit them anyway - perhaps we should remove them?)
(In reply to David Blaikie from comment #2)
> (also, why are we complaining about the decl line/column on a lexical scope?
> We don't emit them anyway - perhaps we should remove them?)
We emit them sometimes... if there's a local declaration. The front-end
would have to notice whether there are any locals, in order to suppress
the unnecessarily lexical scopes.
(In reply to Paul Robinson from comment #3)
> (In reply to David Blaikie from comment #2)
> > (also, why are we complaining about the decl line/column on a lexical scope?
> > We don't emit them anyway - perhaps we should remove them?)
>
> We emit them sometimes... if there's a local declaration. The front-end
> would have to notice whether there are any locals, in order to suppress
> the unnecessarily lexical scopes.
Sorry, I meant we don't emit the line/file of lexical scopes (I get that we
emit lexical scopes - if they contain variables, etc, but we don't seem to ever
put a file/line/column on those)
https://github.com/llvm/llvm-project/blob/f0d997c4723214f5bc098b0acd2e61f3215d4a49/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp#L696