[llvm-bugs] [Bug 40712] terrible diagnostic for undefined @@ version

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Feb 12 17:40:32 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=40712

Reid Kleckner <rnk at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rnk at google.com
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Reid Kleckner <rnk at google.com> ---
The code even acknowledges that:

    // FIXME: produce a better error message.
    if (Symbol.isUndefined() && Rest.startswith("@@") &&
        !Rest.startswith("@@@"))
      report_fatal_error("A @@ version cannot be undefined");

    if (Renames.count(&Symbol) && Renames[&Symbol] != Alias)
      report_fatal_error(llvm::Twine("Multiple symbol versions defined for ") +
                         Symbol.getName());

Anyway, these days it's not hard to call MCContext::reportError, so I just went
ahead and did that in r353907 and mentioned the symbol.

We have no source location, but at least we don't crash.

We should really put these kinds of fixes (migrate report_fatal_error to
MCContext::reportError) on some kind of "good first bug" hotlist, or "good
starter project" list.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190213/e5469d3f/attachment.html>


More information about the llvm-bugs mailing list