<div>Something to maybe keep in mind is that we might "want" to emit the errors/notes in Visual Studio format (sorry :-P)</div><div><br></div><div>If a line starts with:</div><div>Directory/File.cpp(42): error, blabla!</div><div><br></div><div>It will be picked up by the error list window and also be double-clickable in the output window.</div><div><br></div><div>I'm not asking for a feature request, but it would be nice to have this in mind when designing the API for error reporting.</div><div><br></div><div>Thank you,</div><div><br></div><div> Filipe</div><div><br><div class="gmail_quote"><div>On Wed, 29 Mar 2017 at 19:53, Rui Ueyama via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_msg">Put it all together, the following error messages should work for everybody. I'll create a patch to make this change and send it for review. Thank you guys for the inputs!<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><div class="gmail_msg">Undefined symbol error:</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><div class="gmail_msg"></div></div></div></div><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><font face="monospace, monospace" class="gmail_msg">bin/ld.lld: <font color="#ff0000" class="gmail_msg">error</font>: undefined symbol: lld::elf::EhFrameSection<llvm::object::ELFType<(llvm::support::endianness)0, true></font></div></div></div></div></div><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><font face="monospace, monospace" class="gmail_msg"><b class="gmail_msg">>>> defined at</b> Writer.cpp:207 (/ssd/llvm-project/lld/ELF/Writer.cpp:207)</font></div><div class="gmail_msg"><font face="monospace, monospace" class="gmail_msg"><b class="gmail_msg">>>></b>            Writer.cpp.o in archive lib/liblldELF.a</font></div></div><div class="gmail_msg"><br class="gmail_msg"></div></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Duplicate symbol error:<br class="gmail_msg"></div></div></div><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><font face="monospace, monospace" class="gmail_msg">bin/ld.lld: <font color="#ff0000" class="gmail_msg">error</font>: duplicate symbol: lld::elf::MipsGotSection::addEntry(lld::elf::SymbolBody&, long, lld::elf::RelExpr)</font></div><div class="gmail_msg"><font face="monospace, monospace" class="gmail_msg"><b class="gmail_msg">>>> defined at</b> Writer.cpp:38 (/home/buildslave/buildslave/clang-cmake-aarch64-39vma/llvm/tools/lld/ELF/Writer.cpp:38)</font></div><div class="gmail_msg"><font face="monospace, monospace" class="gmail_msg"><b class="gmail_msg">>>></b>            Writer.cpp.o in archive lib/liblldELF.a</font></div><div class="gmail_msg"><font face="monospace, monospace" class="gmail_msg"><b class="gmail_msg">>>> defined at</b> SyntheticSections.cpp:673 (/home/buildslave/buildslave/clang-cmake-aarch64-39vma/llvm/tools/lld/ELF/SyntheticSections.cpp:673)</font></div><div class="gmail_msg"><font face="monospace, monospace" class="gmail_msg"><b class="gmail_msg">>>></b>            SyntheticSections.cpp.o in archive lib/liblldELF.a</font></div></div></div><div class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg">On Tue, Mar 28, 2017 at 5:58 PM, Michael Spencer via llvm-dev <span class="gmail_msg"><<a href="mailto:llvm-dev@lists.llvm.org" class="gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_msg"><div class="gmail_extra gmail_msg"><span class="m_3916890986551929332m_2383354865062108342gmail- gmail_msg"><div class="gmail_msg"><div class="m_3916890986551929332m_2383354865062108342gmail-m_748840340857691451gmail_signature gmail_msg">On Sat, Mar 25, 2017 at 6:56 AM, Hal Finkel via llvm-dev <span class="gmail_msg"><<a href="mailto:llvm-dev@lists.llvm.org" class="gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br class="gmail_msg"></div></div></span><div class="gmail_quote gmail_msg"><span class="m_3916890986551929332m_2383354865062108342gmail- gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" class="gmail_msg"><span class="m_3916890986551929332m_2383354865062108342gmail-m_748840340857691451gmail- gmail_msg">
    <p class="gmail_msg"><br class="gmail_msg">
    </p>
    <div class="m_3916890986551929332m_2383354865062108342gmail-m_748840340857691451gmail-m_2623436989525052654moz-cite-prefix gmail_msg">On 03/24/2017 11:42 PM, Sean Silva via
      llvm-dev wrote:<br class="gmail_msg">
    </div>
    <blockquote type="cite" class="gmail_msg">
      
      <div class="gmail_msg">
        <div class="gmail_msg"><br class="gmail_msg">
          <div class="gmail_extra gmail_msg"><br class="gmail_msg">
            <div class="gmail_quote gmail_msg">On Mar 24, 2017 5:22 PM, "Reid
              Kleckner" <<a href="mailto:rnk@google.com" class="gmail_msg" target="_blank">rnk@google.com</a>>
              wrote:<br type="attribution" class="gmail_msg">
              <blockquote class="m_3916890986551929332m_2383354865062108342gmail-m_748840340857691451gmail-m_2623436989525052654quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                <div class="gmail_msg">I figured you might consider moving the
                  basenames of the filename earlier in the diagnostic,
                  something like:
                  <div class="gmail_msg"><br class="gmail_msg">
                    <div class="gmail_msg">
                      <div class="m_3916890986551929332m_2383354865062108342gmail-m_748840340857691451gmail-m_2623436989525052654quoted-text gmail_msg"><span class="m_3916890986551929332m_2383354865062108342gmail-m_748840340857691451gmail-m_2623436989525052654m_-7391039294458279378gmail-im gmail_msg" style="font-family:monospace,monospace;font-size:12.8px">bin/ld.lld: <b style="color:rgb(255,0,0)" class="gmail_msg">error:</b> duplicate
                          symbol: lld::elf::MipsGotSection::addEntry(lld::elf::SymbolBody&,
                          long, lld::elf::RelExpr)</span></div>
                      <div style="font-family:monospace,monospace;font-size:12.8px" class="gmail_msg"><b class="gmail_msg">>>>
                          defined at</b> Writer.cpp:38 in <span style="font-size:12.8px" class="gmail_msg">/home/buildslave/buildslave/</span><span style="font-size:12.8px" class="gmail_msg">clang-cmake-aarch64-39vma/</span><span style="font-size:12.8px" class="gmail_msg">llvm/tools/lld/ELF/</span></div>
                      <div style="font-family:monospace,monospace;font-size:12.8px" class="gmail_msg"><b class="gmail_msg">>>></b> 
                                  <span style="font-size:12.8px" class="gmail_msg">Writer.cpp.o
                          in archive </span><span style="font-size:12.8px" class="gmail_msg">lib/liblldELF.a</span></div>
                      <div style="font-family:monospace,monospace;font-size:12.8px" class="gmail_msg"><b class="gmail_msg">>>>
                          defined at</b> SyntheticSections.cpp:673 in <span style="font-size:12.8px" class="gmail_msg">/home/buildslave/buildslave/</span><span style="font-size:12.8px" class="gmail_msg">clang-cmake-aarch64-39vma/</span><span style="font-size:12.8px" class="gmail_msg">llvm/tools/lld/ELF/</span></div>
                      <div style="font-family:monospace,monospace;font-size:12.8px" class="gmail_msg"><b class="gmail_msg">>>></b> 
                                  <span style="font-size:12.8px" class="gmail_msg">SyntheticSections.cpp.o
                          in archive </span><span style="font-size:12.8px" class="gmail_msg">lib/liblldELF.a</span></div>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br class="gmail_msg"></span>
    Please don't do this (split the base name from the path). Tools that
    match file names, grep, etc. won't be able to locate the files
    easily. I've worked with projects that, especially when all library
    dependencies are included, have lots of files with generic names
    (e.g. Writer.cpp). This is convenient for relatively self-contained
    projects where you can recognize the file names. We work on one such
    project. This is not the general case.<br class="gmail_msg">
    <br class="gmail_msg">
    If you'd like to make the base name easier to visually
    differentiate, I recommend just repeating it:<br class="gmail_msg">
    <br class="gmail_msg">
    <div class="gmail_msg"><span class="m_3916890986551929332m_2383354865062108342gmail-m_748840340857691451gmail- gmail_msg"><span class="m_3916890986551929332m_2383354865062108342gmail-m_748840340857691451gmail-m_2623436989525052654gmail-im gmail_msg" style="font-family:monospace,monospace;font-size:12.8px">bin/ld.lld: <b style="color:rgb(255,0,0)" class="gmail_msg">error:</b> duplicate symbol:
        lld::elf::MipsGotSection::addEntry(lld::elf::SymbolBody&,
        long, lld::elf::RelExpr)</span>
      </span><div style="font-family:monospace,monospace;font-size:12.8px" class="gmail_msg"><b class="gmail_msg">>>>
          defined at</b> Writer.cpp:38 (<span style="font-size:12.8px" class="gmail_msg">/home/buildslave/buildslave/</span><span style="font-size:12.8px" class="gmail_msg">clang-cmake-aarch64-39vma/</span><span style="font-size:12.8px" class="gmail_msg">llvm/tools/lld/ELF/Writer.cpp:38)</span></div>
      <div style="font-family:monospace,monospace;font-size:12.8px" class="gmail_msg"><b class="gmail_msg">>>></b> 
                  <span style="font-size:12.8px" class="gmail_msg">Writer.cpp.o in
          archive </span><span style="font-size:12.8px" class="gmail_msg">lib/liblldELF.a</span></div>
      <div style="font-family:monospace,monospace;font-size:12.8px" class="gmail_msg"><b class="gmail_msg">>>>
          defined at</b> SyntheticSections.cpp:673 (<span style="font-size:12.8px" class="gmail_msg">/home/buildslave/buildslave/</span><span style="font-size:12.8px" class="gmail_msg">clang-cmake-aarch64-39vma/</span><span style="font-size:12.8px" class="gmail_msg">llvm/tools/lld/ELF/</span>SyntheticSections.cpp:673)</div>
      <div style="font-family:monospace,monospace;font-size:12.8px" class="gmail_msg"><b class="gmail_msg">>>></b> 
                  <span style="font-size:12.8px" class="gmail_msg">SyntheticSections.cpp.o
          in archive </span><span style="font-size:12.8px" class="gmail_msg">lib/liblldELF.a</span></div>
    </div>
    <br class="gmail_msg">
    I'd be happy with that.<br class="gmail_msg">
    <br class="gmail_msg">
    Thanks again,<br class="gmail_msg">
    Hal<div class="gmail_msg"><div class="m_3916890986551929332m_2383354865062108342gmail-m_748840340857691451gmail-h5 gmail_msg"><br class="gmail_msg"></div></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></span><div class="gmail_msg">+1</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">- Michael Spencer<br class="gmail_msg"></div><div class="gmail_msg"><div class="m_3916890986551929332m_2383354865062108342gmail-h5 gmail_msg"><div class="gmail_msg"> </div><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF" class="gmail_msg"><div class="gmail_msg"><div class="m_3916890986551929332m_2383354865062108342gmail-m_748840340857691451gmail-h5 gmail_msg">
    <br class="gmail_msg">
    <blockquote type="cite" class="gmail_msg">
      <div class="gmail_msg">
        <div class="gmail_msg">
          <div class="gmail_extra gmail_msg">
            <div class="gmail_quote gmail_msg">
              <blockquote class="m_3916890986551929332m_2383354865062108342gmail-m_748840340857691451gmail-m_2623436989525052654quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                <div class="gmail_msg">
                  <div class="gmail_msg">
                    <div class="gmail_msg"><br class="gmail_msg">
                    </div>
                  </div>
                  <div class="gmail_msg">Oftentimes filenames are unique enough that it
                    tells you where to go immediately. Maybe it's a bad
                    idea for the source location info, though. You want
                    that to be copy-pastable or clickable in an IDE.</div>
                </div>
              </blockquote>
            </div>
          </div>
        </div>
        <div class="gmail_msg"><br class="gmail_msg">
        </div>
        <div class="gmail_msg">I really like this.</div>
        <div class="gmail_msg"><br class="gmail_msg">
        </div>
        <div class="gmail_msg">I'm on mobile right now which is a worst case,
          but this is pretty readable even there. I've attached a
          screenshot. One nit is that we want it to be clear that
          Writer.cpp.o is in an archive before reading "Writer.cpp.o".
          Maybe something like "archive member Writer.cpp.o in ...".</div>
        <div class="gmail_msg"><br class="gmail_msg">
        </div>
        <div class="gmail_msg">I <span style="font-family:sans-serif" class="gmail_msg">also
            think we might want some bold text for the input file lines
            to clarify better what they are. Maybe ">>> <b class="gmail_msg">from</b>
            <b class="gmail_msg">input</b> <b class="gmail_msg">file</b>: archive member ..." instead of
            just a blank ">>> archive member ..."</span></div>
        <div class="gmail_msg"><span style="font-family:sans-serif" class="gmail_msg"><br class="gmail_msg">
          </span></div>
        <div class="gmail_msg">-- Sean Silva</div>
        <div class="gmail_msg">
          <div class="gmail_extra gmail_msg">
            <div class="gmail_quote gmail_msg">
              <blockquote class="m_3916890986551929332m_2383354865062108342gmail-m_748840340857691451gmail-m_2623436989525052654quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                <div class="m_3916890986551929332m_2383354865062108342gmail-m_748840340857691451gmail-m_2623436989525052654elided-text gmail_msg">
                  <div class="gmail_extra gmail_msg"><br class="gmail_msg">
                    <div class="gmail_quote gmail_msg">On Fri, Mar 24, 2017 at
                      4:07 PM, Rui Ueyama via llvm-dev <span class="gmail_msg"><<a href="mailto:llvm-dev@lists.llvm.org" class="gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a>></span>
                      wrote:<br class="gmail_msg">
                      <blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                        <div class="gmail_msg">
                          <div class="gmail_extra gmail_msg">
                            <div class="gmail_quote gmail_msg"><span class="gmail_msg">On Fri, Mar
                                24, 2017 at 2:04 PM, Sean Silva <span class="gmail_msg"><<a href="mailto:chisophugis@gmail.com" class="gmail_msg" target="_blank">chisophugis@gmail.com</a>></span>
                                wrote:<br class="gmail_msg">
                                <blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                                  <div class="gmail_msg">
                                    <div class="gmail_msg">I lile the idea of having it
                                      more structured and I think your
                                      suggested format is the right
                                      direction.</div>
                                    <div class="gmail_msg"><br class="gmail_msg">
                                    </div>
                                    <div class="gmail_msg">I think one
                                      principle should be that we assume
                                      that file names and symbol names
                                      are "really long" (possibly
                                      wrapped by the terminal etc.).</div>
                                  </div>
                                </blockquote>
                                <div class="gmail_msg"><br class="gmail_msg">
                                </div>
                              </span>
                              <div class="gmail_msg">Right. That's what we should expect.</div>
                              <div class="gmail_msg"><br class="gmail_msg">
                              </div>
                              <div class="gmail_msg">I believe the current error message
                                format for the existing linkers were set
                                more than 30 years ago when path names
                                and symbol names were much shorter than
                                they are today. If they are short, error
                                messages become something like
                                "src/libfoo/bar.o: undefined symbol:
                                strbar", which is quite easy to read.
                                That is unfortunately no longer the case
                                because we are creating significantly
                                larger programs than a few decades ago
                                and C++ name mangling makes symbol names
                                significantly longer than before.</div>
                              <span class="gmail_msg">
                                <div class="gmail_msg"><br class="gmail_msg">
                                </div>
                                <blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                                  <div class="gmail_msg">
                                    <div class="gmail_msg">So I would modify
                                      your suggested format to use the
                                      "note" color for the strings like
                                      "Object 1" so that even if those
                                      lines are wrapped by the terminal
                                      then they can still be easily
                                      visually parsed. We may also want
                                      to do something like ">>>
                                      Object 1:" so that places without
                                      color (like google's internal web
                                      ui for build logs, or if users are
                                      piping the build system's output
                                      into `less` or `tee`) are still a
                                      bit easier to parse in the
                                      presence of wrapped lines.</div>
                                  </div>
                                </blockquote>
                                <div class="gmail_msg"><br class="gmail_msg">
                                </div>
                              </span>
                              <div class="gmail_msg">Makes sense. I tried a few different
                                formats based on suggestions from Mehdi,
                                Hans and you, and come up with this one.
                                What do you think?</div>
                              <div class="gmail_msg"><br class="gmail_msg">
                              </div>
                            </div>
                          </div>
                          <blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px" class="gmail_msg">
                            <div class="gmail_extra gmail_msg">
                              <div class="gmail_quote gmail_msg"><font face="monospace, monospace" class="gmail_msg">
                                  <div class="gmail_msg">bin/ld.lld: <font color="#ff0000" class="gmail_msg"><b class="gmail_msg">error:</b></font>
                                    undefined symbol:
                                    lld::elf::EhFrameSection<llvm::object::ELFType<(llvm::support::endianness)0,
                                    true>
                                    >::addSection(lld::elf::InputSectionBase*)</div>
                                  <div class="gmail_msg"><b class="gmail_msg">>>> referenced by</b>
                                    /home/buildslave/buildslave/clang-cmake-aarch64-39vma/llvm/tools/lld/ELF/Writer.cpp:207</div>
                                  <div class="gmail_msg"><b class="gmail_msg">>>></b>              
                                    lib/liblldELF.a(Writer.cpp.o)</div>
                                  <span class="gmail_msg">
                                    <div class="gmail_msg"><br class="gmail_msg">
                                    </div>
                                    <div class="gmail_msg"><br class="gmail_msg">
                                    </div>
                                    <div class="gmail_msg">bin/ld.lld: <b style="color:rgb(255,0,0)" class="gmail_msg">error:</b> duplicate
                                      symbol:
                                      lld::elf::MipsGotSection::addEntry(lld::elf::SymbolBody&,
                                      long, lld::elf::RelExpr)</div>
                                  </span>
                                  <div class="gmail_msg"><b class="gmail_msg">>>> defined at</b>
                                    /home/buildslave/buildslave/clang-cmake-aarch64-39vma/llvm/tools/lld/ELF/Writer.cpp:38</div>
                                  <div class="gmail_msg"><b class="gmail_msg">>>></b>          
                                     lib/liblldELF.a(Writer.cpp.o)</div>
                                  <div class="gmail_msg"><b class="gmail_msg">>>> defined at</b>
                                    /home/buildslave/buildslave/clang-cmake-aarch64-39vma/llvm/tools/lld/ELF/SyntheticSections.cpp:673</div>
                                  <div class="gmail_msg"><b class="gmail_msg">>>></b>          
                                     lib/liblldELF.a(SyntheticSections.cpp.o)</div>
                                </font></div>
                            </div>
                          </blockquote>
                          <div class="gmail_extra gmail_msg">
                            <div class="gmail_quote gmail_msg">
                              <div class="gmail_msg"><br class="gmail_msg">
                              </div>
                              <div class="gmail_msg">This format prints out source file
                                names and object file names in different
                                lines. I found that that is easier to
                                read than print them in the same line,
                                as error messages with some amount of
                                whitespace are easier to find in dense
                                build system outputs.</div>
                              <div class="gmail_msg">
                                <div class="m_3916890986551929332m_2383354865062108342gmail-m_748840340857691451gmail-m_2623436989525052654m_-7391039294458279378h5 gmail_msg">
                                  <div class="gmail_msg"><br class="gmail_msg">
                                  </div>
                                  <blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                                    <div class="gmail_msg">
                                      <div class="gmail_msg">This principle
                                        also suggests (and your
                                        suggested format does this) that
                                        to avoid having to parse past a
                                        symbol/file name to get to other
                                        information, there should be at
                                        most one symbol/file name on a
                                        given line and there should
                                        never be anything after it on
                                        the line. The ld64 format
                                        violates this, for example.</div>
                                      <div class="gmail_msg"><br class="gmail_msg">
                                      </div>
                                      <div class="gmail_msg">-- Sean Silva<br class="gmail_msg">
                                        <div class="gmail_extra gmail_msg"><br class="gmail_msg">
                                          <div class="gmail_quote gmail_msg">
                                            <div class="gmail_msg">
                                              <div class="m_3916890986551929332m_2383354865062108342gmail-m_748840340857691451gmail-m_2623436989525052654m_-7391039294458279378m_-7137631181086882753gmail-m_-2039451436578983823gmail-h5 gmail_msg">On
                                                Mar 23, 2017 4:18 PM,
                                                "Rui Ueyama via
                                                llvm-dev" <<a href="mailto:llvm-dev@lists.llvm.org" class="gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a>>
                                                wrote:<br type="attribution" class="gmail_msg">
                                              </div>
                                            </div>
                                            <blockquote class="m_3916890986551929332m_2383354865062108342gmail-m_748840340857691451gmail-m_2623436989525052654m_-7391039294458279378m_-7137631181086882753gmail-m_-2039451436578983823gmail-m_-3086134180091544953m_-5073081004223806894quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                                              <div class="gmail_msg">
                                                <div class="m_3916890986551929332m_2383354865062108342gmail-m_748840340857691451gmail-m_2623436989525052654m_-7391039294458279378m_-7137631181086882753gmail-m_-2039451436578983823gmail-h5 gmail_msg">
                                                  <div class="gmail_msg">
                                                    <div class="gmail_msg">Folks,</div>
                                                    <div class="gmail_msg"><br class="gmail_msg">
                                                    </div>
                                                    <div class="gmail_msg">I'd like
                                                      propose a new
                                                      error message
                                                      format for LLD so
                                                      that error message
                                                      for undefined or
                                                      duplicated symbols
                                                      are more
                                                      informative and
                                                      easy to read.</div>
                                                    <div class="gmail_msg"><br class="gmail_msg">
                                                    </div>
                                                    <div class="gmail_msg">Below are
                                                      examples of the
                                                      current error
                                                      messages (note
                                                      that characters in
                                                      red are actually
                                                      red on terminal):</div>
                                                    <div class="gmail_msg">
                                                      <div class="gmail_msg"><br class="gmail_msg">
                                                      </div>
                                                    </div>
                                                    <blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px" class="gmail_msg">
                                                      <div class="gmail_msg">
                                                        <div class="gmail_msg"><b class="gmail_msg">Undefined
                                                          symbols</b></div>
                                                      </div>
                                                      <div class="gmail_msg">
                                                        <div class="gmail_msg">/ssd/clang/bin/ld.lld: <font color="#ff0000" class="gmail_msg">error</font>: /ssd/llvm-project/lld/ELF/Writer.cpp:207:
                                                          undefined
                                                          symbol
                                                          'lld::elf::EhFrameSection<llvm::object::ELFType<(llvm::support::endianness)0,
                                                          true>
                                                          >::addSection(lld::elf::InputSectionBase*)'</div>
                                                      </div>
                                                      <div class="gmail_msg">
                                                        <div class="gmail_msg"><br class="gmail_msg">
                                                        </div>
                                                      </div>
                                                      <div class="gmail_msg">
                                                        <div class="gmail_msg"><b class="gmail_msg">Conflicting
                                                          symbols</b></div>
                                                      </div>
                                                      <div class="gmail_msg">
                                                        <div class="gmail_msg">/ssd/clang/bin/ld.lld: <span style="color:rgb(255,0,0)" class="gmail_msg">error</span>: /ssd/llvm-project/lld/ELF/Writer.cpp:38:
                                                          duplicate
                                                          symbol
                                                          'lld::elf::MipsGotSection::addEntry(lld::elf::SymbolBody&,
                                                          long,
                                                          lld::elf::RelExpr)'</div>
                                                      </div>
                                                      <div class="gmail_msg">
                                                        <div class="gmail_msg">/ssd/clang/bin/ld.lld:
                                                          error:
                                                          /ssd/llvm-project/lld/ELF/SyntheticSections.cpp:673:
                                                          previous
                                                          definition was
                                                          here</div>
                                                      </div>
                                                    </blockquote>
                                                    <div class="gmail_msg"><br class="gmail_msg">
                                                    </div>
                                                    <div class="gmail_msg">
                                                      <div class="gmail_msg">For each
                                                        error, we want
                                                        to print out
                                                        information
                                                        about 1) symbol
                                                        name, 2) source
                                                        file name(s) and
                                                        source
                                                        location(s) if
                                                        available and 3)
                                                        source object
                                                        file name(s) and
                                                        archive file
                                                        name(s) if
                                                        available.
                                                        Currently, these
                                                        messages lack
                                                        object file
                                                        names, and I
                                                        think the above
                                                        error messages
                                                        are a bit hard
                                                        to grasp because
                                                        too much
                                                        information is
                                                        packed into each
                                                        line.</div>
                                                      <div class="gmail_msg"><br class="gmail_msg">
                                                      </div>
                                                    </div>
                                                    <div class="gmail_msg">I'm thinking of
                                                      changing the
                                                      format to
                                                      something like the
                                                      following:</div>
                                                    <div class="gmail_msg"><br class="gmail_msg">
                                                    </div>
                                                    <blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px" class="gmail_msg">
                                                      <div class="gmail_msg">
                                                        <div class="gmail_msg"><b class="gmail_msg">Undefined
                                                          symbols</b></div>
                                                      </div>
                                                      <div class="gmail_msg">
                                                        <div class="gmail_msg">/ssd/clang/bin/ld.lld: <span style="color:rgb(255,0,0)" class="gmail_msg">error</span>: undefined symbol:
                                                          lld::elf::EhFrameSection<llvm::object::ELFType<(llvm::support::endianness)0,
                                                          true>
                                                          >::addSection(lld::elf::InputSectionBase*)</div>
                                                      </div>
                                                      <div class="gmail_msg">
                                                        <div class="gmail_msg">  Source:
                                                          /ssd/llvm-project/lld/ELF/Writer.cpp:207</div>
                                                      </div>
                                                      <div class="gmail_msg">
                                                        <div class="gmail_msg">  Object:
                                                          lib/liblldELF.a(Writer.cpp.o)</div>
                                                      </div>
                                                      <div class="gmail_msg">
                                                        <div class="gmail_msg"><br class="gmail_msg">
                                                        </div>
                                                      </div>
                                                      <div class="gmail_msg">
                                                        <div class="gmail_msg"><b class="gmail_msg">Conflicting
                                                          symbols</b></div>
                                                      </div>
                                                      <div class="gmail_msg">
                                                        <div class="gmail_msg">/ssd/clang/bin/ld.lld: <span style="color:rgb(255,0,0)" class="gmail_msg">error</span>: duplicate symbol:
                                                          lld::elf::MipsGotSection::addEntry(lld::elf::SymbolBody&,
                                                          long,
                                                          lld::elf::RelExpr)</div>
                                                      </div>
                                                      <div class="gmail_msg">
                                                        <div class="gmail_msg">  Source 1:
/ssd/llvm-project/lld/ELF/Writer.cpp:38</div>
                                                      </div>
                                                      <div class="gmail_msg">
                                                        <div class="gmail_msg">  Source 2:
/ssd/llvm-project/lld/ELF/SyntheticSections.cpp:673</div>
                                                      </div>
                                                      <div class="gmail_msg">
                                                        <div class="gmail_msg">  Object 1:
lib/liblldELF.a(Writer.cpp.o)</div>
                                                      </div>
                                                      <div class="gmail_msg">
                                                        <div class="gmail_msg">  Object 2
                                                          :
                                                          lib/liblldELF.a(SyntheticSections.cpp.o)</div>
                                                      </div>
                                                    </blockquote>
                                                    <div class="gmail_msg"><br class="gmail_msg">
                                                    </div>
                                                    <div class="gmail_msg">The new error
                                                      messages contain
                                                      complete
                                                      information that
                                                      the linker is able
                                                      to gather, and it
                                                      uses more vertical
                                                      space to improve
                                                      readability.</div>
                                                    <div class="gmail_msg"><br class="gmail_msg">
                                                    </div>
                                                    <div class="gmail_msg">Thoughts?</div>
                                                  </div>
                                                  <br class="gmail_msg">
                                                </div>
                                              </div>
_______________________________________________<br class="gmail_msg">
                                              LLVM Developers mailing
                                              list<br class="gmail_msg">
                                              <a href="mailto:llvm-dev@lists.llvm.org" class="gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a><br class="gmail_msg">
                                              <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="gmail_msg">
                                              <br class="gmail_msg">
                                            </blockquote>
                                          </div>
                                          <br class="gmail_msg">
                                        </div>
                                      </div>
                                    </div>
                                  </blockquote>
                                </div>
                              </div>
                            </div>
                            <br class="gmail_msg">
                          </div>
                        </div>
                        <br class="gmail_msg">
                        _______________________________________________<br class="gmail_msg">
                        LLVM Developers mailing list<br class="gmail_msg">
                        <a href="mailto:llvm-dev@lists.llvm.org" class="gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a><br class="gmail_msg">
                        <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="gmail_msg">
                        <br class="gmail_msg">
                      </blockquote>
                    </div>
                    <br class="gmail_msg">
                  </div>
                </div>
              </blockquote>
            </div>
            <br class="gmail_msg">
          </div>
        </div>
      </div>
      <br class="gmail_msg">
      <fieldset class="m_3916890986551929332m_2383354865062108342gmail-m_748840340857691451gmail-m_2623436989525052654mimeAttachmentHeader gmail_msg"></fieldset>
      <br class="gmail_msg">
      <pre class="gmail_msg">_______________________________________________
LLVM Developers mailing list
<a class="m_3916890986551929332m_2383354865062108342gmail-m_748840340857691451gmail-m_2623436989525052654moz-txt-link-abbreviated gmail_msg" href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>
<a class="m_3916890986551929332m_2383354865062108342gmail-m_748840340857691451gmail-m_2623436989525052654moz-txt-link-freetext gmail_msg" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
    </blockquote>
    <br class="gmail_msg">
    </div></div><span class="m_3916890986551929332m_2383354865062108342gmail-m_748840340857691451gmail-HOEnZb gmail_msg"><font color="#888888" class="gmail_msg"><pre class="m_3916890986551929332m_2383354865062108342gmail-m_748840340857691451gmail-m_2623436989525052654moz-signature gmail_msg" cols="72">-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
  </font></span></div>

<br class="gmail_msg">_______________________________________________<br class="gmail_msg">
LLVM Developers mailing list<br class="gmail_msg">
<a href="mailto:llvm-dev@lists.llvm.org" class="gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="gmail_msg">
<br class="gmail_msg"></blockquote></div></div></div><br class="gmail_msg"></div></div>
<br class="gmail_msg">_______________________________________________<br class="gmail_msg">
LLVM Developers mailing list<br class="gmail_msg">
<a href="mailto:llvm-dev@lists.llvm.org" class="gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="gmail_msg">
<br class="gmail_msg"></blockquote></div><br class="gmail_msg"></div></div>
_______________________________________________<br class="gmail_msg">
LLVM Developers mailing list<br class="gmail_msg">
<a href="mailto:llvm-dev@lists.llvm.org" class="gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="gmail_msg">
</blockquote></div></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature">  F<br></div>