[PATCH] D52104: lld-link: print demangled symbol names for "undefined symbol" diagnostics

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 14 12:59:46 PDT 2018


thakis added inline comments.


================
Comment at: llvm/lib/Demangle/MicrosoftDemangle.cpp:1020-1022
+  if (initializeOutputStream(nullptr, nullptr, OS, 1024))
+    // FIXME: Propagate out-of-memory as an error?
+    std::terminate();
----------------
zturner wrote:
> Is this returning `true` if it fails?  Gross.  Can we make it return `false` if it fails?
Returning true on error is reasonably common in the codebase: http://llvm-cs.pcc.me.uk/?q=true+on+error (e.g. https://reviews.llvm.org/D45898#inline-454138) I too wish it wasn't so.

(I'm also calling an existing function here, so I'd prefer to not change all the existing callers.)


https://reviews.llvm.org/D52104





More information about the llvm-commits mailing list