[llvm-dev] How the LLVM handle the debug location information of continue keyword and right brace(loop end location)?

Marcin SÅ‚owik via llvm-dev llvm-dev at lists.llvm.org
Sat Jun 3 04:20:46 PDT 2017


On Jun 3, 2017 9:48 AM, "Frozen via llvm-dev" <llvm-dev at lists.llvm.org>
wrote:

*Why continue keyword can be emitted but right brace won't be emitted, and
debbuger can stop at continue keyword statement but won't stop at right
brace statement?*


Simply because continue keyword is a part of the AST, while '}' is not.

And you don't break on "natural" terminators. Also, would you expect a
different behavior between:

for(i=0;i<N;++i)
    doStuff();

And:

for(i=0;i<N;++i) {
    doStuff();
}

While they should be identical on AST level?

Cheers,
Marcin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170603/b9e9b6cc/attachment.html>


More information about the llvm-dev mailing list