[PATCH] D52104: lld-link: print demangled symbol names for "undefined symbol" diagnostics
Erik Pilkington via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 14 10:57:23 PDT 2018
erik.pilkington added inline comments.
================
Comment at: libcxxabi/src/demangle/Utility.h:173
+inline bool initializeOutputStream(char *Buf, size_t *N, OutputStream &S,
+ size_t InitSize) {
----------------
ruiu wrote:
> Looks like there are two patterns how to use this function -- one way is to pass `nullptr, nullptr` as first two arguments, and the other is to pass an actual buffer. Can you separate that as two functions?
>
> It looks like the latter use case is used only once, so you might be able to inline it.
There are actually many uses in the LLVM version, see llvm/lib/Demangle/ItaniumDemangle.cpp. Personally, I like it as a single function that encapsulates the buffer initialization for __cxa_demangle. I agree its a bit awkward, but thats just the API that it's trying to implement.
https://reviews.llvm.org/D52104
More information about the llvm-commits
mailing list