<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Take a look at the IR clang produces for C99 variable-length arrays.<div class=""><br class=""></div><div class="">-- adrian<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Feb 13, 2020, at 10:03 AM, Levo DeLellis via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hi. I searched and the closest thing I could find was this <a href="http://lists.llvm.org/pipermail/llvm-dev/2018-February/121348.html" class="">http://lists.llvm.org/pipermail/llvm-dev/2018-February/121348.html</a></div><div class=""><br class=""></div><div class="">Currently a known sized array looks and debugs as expected. I use llvm.dbg.declare with DICompositeType tag: DW_TAG_array_type and the size field. In my language arrays are always passed around with a pointer and size pair. I'd like debugging to show up as nicely instead of a pointer addr with no information about the elements. How would I do this? I don't use the C API, I output llvm-ir directly. I was hoping I can call <code class="gmail-docutils gmail-literal gmail-notranslate"><span class="gmail-pre">llvm.dbg.declare/addr/<code class="gmail-docutils gmail-literal gmail-notranslate"><span class="gmail-pre">value to specify the pointer, name and size of the variable but I really have no idea how to pass the size to the debugger.</span></code></span></code></div><div class=""><code class="gmail-docutils gmail-literal gmail-notranslate"><span class="gmail-pre"><code class="gmail-docutils gmail-literal gmail-notranslate"><span class="gmail-pre"><br class=""></span></code></span></code></div></div>
_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></div></blockquote></div><br class=""></div></body></html>