<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I'll only comment on the stuff that affects me.<div class=""><br class=""><div><blockquote type="cite" class=""><div dir="ltr" class=""><div class=""><span id="inbox-inbox-docs-internal-guid-68353e50-4408-e1e7-100e-f9ce9abc13e0" class=""><ol style="margin-top:0pt;margin-bottom:0pt" class=""><ol style="margin-top:0pt;margin-bottom:0pt" class=""><li style="list-style-type:lower-alpha;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">Use llvm streams instead of </span><span style="font-size:14.6667px;font-family:"courier new";vertical-align:baseline;white-space:pre-wrap" class="">lldb::StreamString</span></div></li><ol style="margin-top:0pt;margin-bottom:0pt" class=""><li style="list-style-type:lower-roman;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">Supports output re-targeting (stderr, stdout, std::string, etc), printf style formatting, and type-safe streaming operators.</span></div></li><li style="list-style-type:lower-roman;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">Interoperates nicely with many existing llvm utility classes</span></div></li><li style="list-style-type:lower-roman;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">Risk: 4</span></div></li><li style="list-style-type:lower-roman;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">Impact: 5</span></div></li><li style="list-style-type:lower-roman;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">Difficulty / Effort: 7</span></div></li></ol></ol></ol></span></div></div></blockquote><div><br class=""></div><div>I don't like that llvm's stringstream needs to be babied to make it produce its string.  You have to wrap it and then flush it and then read the string.  Maybe a subclass could be made that wraps its own string and flushes automatically on read?</div><br class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class=""><span id="inbox-inbox-docs-internal-guid-68353e50-4408-e1e7-100e-f9ce9abc13e0" class=""><ol style="margin-top:0pt;margin-bottom:0pt" class="" start="1"><ol style="margin-top:0pt;margin-bottom:0pt" class="" start="2"><li style="list-style-type:lower-alpha;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">Use </span><span style="font-size:14.6667px;font-family:"courier new";vertical-align:baseline;white-space:pre-wrap" class="">llvm::Error</span><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class=""> instead of </span><span style="font-size:14.6667px;font-family:"courier new";vertical-align:baseline;white-space:pre-wrap" class="">lldb::Error</span></div></li><ol style="margin-top:0pt;margin-bottom:0pt" class=""><li style="list-style-type:lower-roman;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class=""><span style="font-size:14.6667px;line-height:20.24px;font-family:"courier new";vertical-align:baseline" class="">llvm::Error</span><span style="font-size:14.6667px;line-height:20.24px;vertical-align:baseline" class=""> </span>is an error class that *requires* you to check whether it succeeded or it will assert.  In a way, it's similar to a C++ exception, except that it doesn't come with the performance hit associated with exceptions.  It's extensible, and can be easily extended to support the various ways LLDB needs to construct errors and error messages.</span></div></li><li style="list-style-type:lower-roman;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="line-height:1.38;font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">Would need to first rename </span><span style="line-height:1.38;font-size:14.6667px;font-family:"courier new";vertical-align:baseline;white-space:pre-wrap" class="">lldb::Error</span><span style="line-height:1.38;font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class=""> to </span><span style="font-size:14.6667px;font-family:"courier new";vertical-align:baseline;white-space:pre-wrap" class=""><span style="line-height:1.38" class="">LLDBError </span></span><span style="font-size:14.6667px;line-height:20.24px;white-space:pre-wrap" class="">so that te conversion from <span style="font-family:"courier new";font-size:14.6667px;line-height:20.24px" class="">LLDBError</span> to </span><span style="font-family:"courier new";font-size:14.6667px;line-height:20.24px;white-space:pre-wrap" class="">llvm::Error </span><span style="font-size:14.6667px;line-height:20.24px;white-space:pre-wrap" class="">could be done incrementally.</span></div></li><li style="list-style-type:lower-roman;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">Risk: 7</span></div></li><li style="list-style-type:lower-roman;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">Impact: 7</span></div></li><li style="list-style-type:lower-roman;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">Difficulty / Effort: 8</span></div></li></ol></ol></ol></span></div></div></blockquote><div><br class=""></div><div>This would help me a lot if the underlying Clang APIs implemented it.  Unfortunately the expression parser mainly just receives diagnostics and has to deal with them.</div><div>From the perspective of internal use, I could live with llvm::Error, particularly if it gets us 3f.</div><div><br class=""></div><blockquote type="cite" class=""><div dir="ltr" class=""><div class=""><span id="inbox-inbox-docs-internal-guid-68353e50-4408-e1e7-100e-f9ce9abc13e0" class=""><ol style="margin-top:0pt;margin-bottom:0pt" class="" start="1"><ol style="margin-top:0pt;margin-bottom:0pt" class="" start="4"><li style="list-style-type:lower-alpha;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;font-family:"courier new";vertical-align:baseline;white-space:pre-wrap" class="">ArrayRef </span><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">instead of </span><span style="font-size:14.6667px;font-family:"courier new";vertical-align:baseline;white-space:pre-wrap" class="">const void *</span><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">, len everywhere</span></div></li><ol style="margin-top:0pt;margin-bottom:0pt" class=""><li style="list-style-type:lower-roman;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">Same analysis as </span><span style="font-size:14.6667px;font-family:"courier new";vertical-align:baseline;white-space:pre-wrap" class="">StringRef</span></div></li></ol></ol></ol></span></div></div></blockquote><blockquote type="cite" class=""><div dir="ltr" class=""><div class=""><span id="inbox-inbox-docs-internal-guid-68353e50-4408-e1e7-100e-f9ce9abc13e0" class=""><ol style="margin-top:0pt;margin-bottom:0pt" class="" start="1"><ol style="margin-top:0pt;margin-bottom:0pt" class="" start="5"><li style="list-style-type:lower-alpha;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;font-family:"courier new";vertical-align:baseline;white-space:pre-wrap" class="">MutableArrayRef </span><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">instead of </span><span style="font-size:14.6667px;font-family:"courier new";vertical-align:baseline;white-space:pre-wrap" class="">void *</span><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">, len everywhere</span></div></li><ol style="margin-top:0pt;margin-bottom:0pt" class=""><li style="list-style-type:lower-roman;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">Same analysis as </span><span style="font-size:14.6667px;font-family:"courier new";vertical-align:baseline;white-space:pre-wrap" class="">StringRef</span></div></li></ol></ol></ol></span></div></div></blockquote><div><br class=""></div><div>At one point I made a templated mixin class that would make everything that vended GetNum*/Get*AtIndex functions also vend an iterator.  Hopefully we can get that implemented everywhere.</div><br class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class=""><span id="inbox-inbox-docs-internal-guid-68353e50-4408-e1e7-100e-f9ce9abc13e0" class=""><ol style="margin-top:0pt;margin-bottom:0pt" class="" start="1"><ol style="margin-top:0pt;margin-bottom:0pt" class="" start="6"><li style="list-style-type:lower-alpha;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size: 14.6667px; white-space: pre-wrap;" class="">Testing - Our testing infrastructure is unstable, and our test coverage is lacking.  We should take steps to improve this.</span></div></li></ol><ol style="margin-top:0pt;margin-bottom:0pt" class=""><li style="list-style-type:lower-alpha;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">Port as much as possible to lit</span></div></li><ol style="margin-top:0pt;margin-bottom:0pt" class=""><li style="list-style-type:lower-roman;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">Simple tests should be trivial to port to lit today.  If nothing else this serves as a proof of concept while increasing the speed and stability of the test suite, since lit is a more stable harness.</span></div></li></ol><li style="list-style-type:lower-alpha;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">Separate testing tools</span></div></li><ol style="margin-top:0pt;margin-bottom:0pt" class=""><li style="list-style-type:lower-roman;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">One question that remains open is </span><span style="font-size:14.6667px;font-weight:700;vertical-align:baseline;white-space:pre-wrap" class="">how</span><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class=""> to represent the complicated needs of a debugger in lit tests.  Part a) above covers the trivial cases, but what about the difficult cases?  In </span><a href="https://reviews.llvm.org/D24591" style="text-decoration:none" class=""><span style="font-size:14.6667px;color:rgb(17,85,204);text-decoration:underline;vertical-align:baseline;white-space:pre-wrap" class="">https://reviews.llvm.org/D24591</span></a><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class=""> a number of ideas were discussed.  We started getting to this idea towards the end, about a separate tool which has an interface independent of the command line interface and which can be used to test.  lldb-mi was mentioned.  While I have serious concerns about lldb-mi due to its poorly written and tested codebase, I do agree in principle with the methodology.  In fact, this is the entire philosophy behind lit as used with LLVM, clang, lld, etc.  </span></div></li></ol></ol></ol><br class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt; margin-left: 108pt;" class=""><span style="font-size:14.6667px;font-family:arial;vertical-align:baseline;white-space:pre-wrap" class="">I don’t take full credit for this idea.  I had been toying with a similar idea for some time, but it was further cemented in an offline discussion with a co-worker.  </span></div><br class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt; margin-left: 108pt;" class=""><span style="font-size:14.6667px;font-family:arial;vertical-align:baseline;white-space:pre-wrap" class="">There many small, targeted tools in LLVM (e.g. llc, lli, llvm-objdump, etc) whose purpose are to be chained together to do interesting things.  Instead of a command line api as we think of in LLDB where you type commands from an interactive prompt, they have a command line api as you would expect from any tool which is launched from a shell.</span></div><br class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt; margin-left: 108pt;" class=""><span style="font-size:14.6667px;font-family:arial;vertical-align:baseline;white-space:pre-wrap" class="">I can imagine many potential candidates for lldb tools of this nature.  Off the top of my head:</span></div><ol style="margin-top:0pt;margin-bottom:0pt" class=""><li dir="ltr" style="list-style-type:decimal;font-size:14.6667px;font-family:arial;vertical-align:baseline;margin-left:144px" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">lldb-unwind - A tool for testing the unwinder.  Accepts byte code as input and passes it through to the unwinder, outputting a compressed summary of the steps taken while unwinding, which could be pattern matched in lit.  The output format is entirely controlled by the tool, and not by the unwinder itself, so it would be stable in the face of changes to the underlying unwinder.  Could have various options to enable or disable features of the unwinder in order to force the unwinder into modes that can be tricky to encounter in the wild.</span></div></li><li dir="ltr" style="list-style-type:decimal;font-size:14.6667px;font-family:arial;vertical-align:baseline;margin-left:144px" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">lldb-symbol - A tool for testing symbol resolution.  Could have options for testing things like:</span></div></li><ol style="margin-top:0pt;margin-bottom:0pt" class=""><li dir="ltr" style="list-style-type:lower-alpha;font-size:14.6667px;font-family:arial;vertical-align:baseline;margin-left:144px" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">Determining if a symbol matches an executable</span></div></li><li dir="ltr" style="list-style-type:lower-alpha;font-size:14.6667px;font-family:arial;vertical-align:baseline;margin-left:144px" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">looking up a symbol by name in the debug info, and mapping it to an address in the process.  </span></div></li><li dir="ltr" style="list-style-type:lower-alpha;font-size:14.6667px;font-family:arial;vertical-align:baseline;margin-left:144px" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">Displaying candidate symbols when doing name lookup in a particular scope (e.g. while stopped at a breakpoint).</span></div></li></ol><li dir="ltr" style="list-style-type:decimal;font-size:14.6667px;font-family:arial;vertical-align:baseline;margin-left:144px" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">lldb-breakpoint - A tool for testing breakpoints and stepping.  Various options could include:</span></div></li><ol style="margin-top:0pt;margin-bottom:0pt" class=""><li dir="ltr" style="list-style-type:lower-alpha;font-size:14.6667px;font-family:arial;vertical-align:baseline;margin-left:144px" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">Set breakpoints and out addresses and/or symbol names where they were resolved to.</span></div></li><li dir="ltr" style="list-style-type:lower-alpha;font-size:14.6667px;font-family:arial;vertical-align:baseline;margin-left:144px" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">Trigger commands, so that when a breakpoint is hit the tool could automatically continue and try to run to another breakpoint, etc.</span></div></li><li dir="ltr" style="list-style-type:lower-alpha;font-size:14.6667px;font-family:arial;vertical-align:baseline;margin-left:144px" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">options to inspect certain useful pieces of state about an inferior, to be matched in lit. </span></div></li></ol><li dir="ltr" style="list-style-type:decimal;font-size:14.6667px;font-family:arial;vertical-align:baseline;margin-left:144px" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">lldb-interpreter - tests the jitter etc.  I don’t know much about this, but I don’t see why this couldn’t be tested in a manner similar to how lli is tested.</span></div></li><li dir="ltr" style="list-style-type:decimal;font-size:14.6667px;font-family:arial;vertical-align:baseline;margin-left:144px" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">lldb-platform - tests lldb local and remote platform interfaces.</span></div></li><li dir="ltr" style="list-style-type:decimal;font-size:14.6667px;font-family:arial;vertical-align:baseline;margin-left:144px" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">lldb-cli -- lldb interactive command line.</span></div></li><li dir="ltr" style="list-style-type:decimal;font-size:14.6667px;font-family:arial;vertical-align:baseline;margin-left:144px" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">lldb-format - lldb data formatters etc.</span></div></li></ol></span></div></div></blockquote><div><br class=""></div><div>I'm thinking of re-implementing the "inline" tester as a C++ tool that could be driven by lit. </div><div>As far as anything touching the expression parser, I'd prefer just implementing solid testers inside llvm/clang, rather than something on top of LLDB.</div><br class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class=""><span id="inbox-inbox-docs-internal-guid-68353e50-4408-e1e7-100e-f9ce9abc13e0" class=""><ol style="margin-top:0pt;margin-bottom:0pt" start="3" class=""><li dir="ltr" style="list-style-type:lower-alpha;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">Tests NOW, not later.</span></div></li><ol style="margin-top:0pt;margin-bottom:0pt" class=""><li dir="ltr" style="list-style-type:lower-roman;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">I know we’ve been over this a million times and it’s not worth going over the arguments again.  And I know it’s hard to write tests, often requiring the invention of new SB APIs.  Hopefully those issues will be addressed by above a) and b) above and writing tests will be easier.  Vedant Kumar ran some analytics on the various codebases and found that LLDB has the lowest test / commit ratio of any LLVM project (He didn’t post numbers for lld, so I’m not sure what it is there).</span></div></li><ol style="margin-top:0pt;margin-bottom:0pt" class=""><li dir="ltr" style="list-style-type:decimal;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:13.3333px;color:rgb(33,33,33);vertical-align:baseline;white-space:pre-wrap" class="">lldb: 287 of the past 1000 commits</span></div></li><li dir="ltr" style="list-style-type:decimal;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:13.3333px;color:rgb(33,33,33);vertical-align:baseline;white-space:pre-wrap" class="">llvm: 511 of the past 1000 commits</span></div></li><li dir="ltr" style="list-style-type:decimal;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:13.3333px;color:rgb(33,33,33);vertical-align:baseline;white-space:pre-wrap" class="">clang: 622 of the past 1000 commits</span></div></li><li dir="ltr" style="list-style-type:decimal;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:13.3333px;color:rgb(33,33,33);vertical-align:baseline;white-space:pre-wrap" class="">compiler-rt: 543 of the past 1000 commits</span></div></li></ol></ol></ol><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt; margin-left: 108pt;" class=""><span style="font-size:14.6667px;font-family:arial;color:rgb(33,33,33);vertical-align:baseline;white-space:pre-wrap" class="">This is an alarming statistic, and I would love to see this number closer to 50%.</span></div></span></div></div></blockquote><div><br class=""></div><div>I'm definitely a culprit here.  Many fixes I make that don't have tests are for problems we can't reproduce.  In general, LLDB suffers from a lack of "failure tests" which check what happens when something doesn't work.</div><div>IMO a very useful avenue for investigation would be to add various selectable "failure generators" into LLDB that simulate the failure of particular operations or subsystems.  Then we could use these as proxies for failures we can't reproduce as integration tests.</div><br class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class=""><span id="inbox-inbox-docs-internal-guid-68353e50-4408-e1e7-100e-f9ce9abc13e0" class=""><ol style="margin-top:0pt;margin-bottom:0pt" start="3" class=""><li dir="ltr" style="list-style-type:decimal;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;line-height:20.24px;white-space:pre-wrap" class="">Code style / development conventions - Aside from just the column limitations and bracing styles, there are other areas where LLDB differs from LLVM on code style.  We should continue to adopt more of LLVM's style where it makes sense.  I've identified a couple of areas (incomplete list) which I outline below.</span>  <br class=""></div></li><ol style="margin-top:0pt;margin-bottom:0pt" class=""><li dir="ltr" style="list-style-type:lower-alpha;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">Clean up the mess of cyclical dependencies and properly layer the libraries.  This is especially important for things like lldb-server that need to link in as little as possible, but regardless it leads to a more robust architecture, faster build and link times, better testability, and is required if we ever want to do a modules build of LLDB</span></div></li><li dir="ltr" style="list-style-type:lower-alpha;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">Use CMake instead of Xcode project (CMake supports Frameworks).  CMake supports Apple Frameworks, so the main roadblock to getting this working is just someone doing it.  Segmenting the build process by platform doesn't make sense for the upstream, especially when there is a perfectly workable solution.  I have no doubt that the resulting Xcode workspace generated automatically by CMake will <b class="">not </b>be as "nice" as one that is maintained by hand.  We face this problem with Visual </span><span style="font-size:14.6667px;line-height:20.24px;white-space:pre-wrap" class="">Studio on Windows as well.  The solution that most people have adopted is to continue using the IDE for code editing and debugging, but for actually running the build, use CMake with Ninja.  A similar workflow should still be possible with an OSX CMake build, but as I do not work every day on a Mac, all I can say is that it's possible, I have no idea how impactful it would be on peoples' workflows.</span></div></li></ol></ol></span></div></div></blockquote><div><br class=""></div>My dev workflow these days is running xcodebuild from vim.  I would love to be running ninja.</div><div><br class=""></div><div><blockquote type="cite" class=""><div dir="ltr" class=""><div class=""><span id="inbox-inbox-docs-internal-guid-68353e50-4408-e1e7-100e-f9ce9abc13e0" class=""><ol style="margin-top:0pt;margin-bottom:0pt" start="3" class=""><ol style="margin-top:0pt;margin-bottom:0pt" class="" start="3"><li dir="ltr" style="list-style-type:lower-alpha;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span class="" style="font-size: 14.6667px; vertical-align: baseline; white-space: pre-wrap;">Convert </span><span class="" style="font-size: 14.6667px; font-family: 'courier new'; vertical-align: baseline; white-space: pre-wrap;">T foo(X, Y, Error &error)</span><span class="" style="font-size: 14.6667px; vertical-align: baseline; white-space: pre-wrap;"> functions to </span><span class="" style="font-size: 14.6667px; font-family: 'courier new'; vertical-align: baseline; white-space: pre-wrap;">Expected<T> foo(X, Y)</span><span class="" style="font-size: 14.6667px; vertical-align: baseline; white-space: pre-wrap;"> style (Depends on 1.c)</span></div></li><ol style="margin-top:0pt;margin-bottom:0pt" class=""><li dir="ltr" style="list-style-type:lower-roman;font-size:14.6667px;font-family:arial;vertical-align:baseline" class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:14.6667px;font-family:"courier new";vertical-align:baseline;white-space:pre-wrap" class="">llvm::Expected</span><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class=""> is based on the </span><span style="font-size:14.6667px;font-family:"courier new";vertical-align:baseline;white-space:pre-wrap" class="">llvm::Error </span><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">class described earlier.  It’s used when a function is supposed to return a value, but it could fail.  By packaging the error with the return value, it’s impossible to have a situation where you use the return value even in case of an error, and because </span><span style="font-size:14.6667px;font-family:"courier new";vertical-align:baseline;white-space:pre-wrap" class="">llvm::Error </span><span style="font-size:14.6667px;vertical-align:baseline;white-space:pre-wrap" class="">has mandatory checking, it’s also impossible to have a sitaution where you don’t check the error.  So it’s very safe.  </span></div></li></ol></ol></ol></span></div></div></blockquote><div><br class=""></div>Marshaling Error objects around is a regular aggravation and makes my code more messy.  I welcome with open arms anything that reduces that mess.</div></div></body></html>