[PATCH] D20083: Add an c++ itanium demangler to llvm

Ben Craig via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 24 09:25:53 PDT 2016


bcraig added a subscriber: bcraig.

================
Comment at: lib/Demangle/ItaniumDemangle.cpp:12-14
@@ +11,5 @@
+
+// This file exports a single function: llvm::itanium_demangle.
+// It also has no dependencies on the rest of llvm. It is implemented this way
+// so that it can be easily reused in libcxxabi.
+
----------------
This bothers me a lot, for a couple of different reasons.

1. I think there are already too many build time dependencies crossing the compiler / runtime boundary.  I'm tired of my libcxx and libcxxabi builds failing because of unrelated cmake changes in LLVM.  To avoid that, I could build a standalone version... but now that won't be easily possible because of this change.  Building libcxx and libcxxabi shouldn't require me to pull down llvm sources, or to have a "dev" install of llvm, and this change makes that problem even worse than it already is.  Will this even work for the cross compilation cases?

2. This (and the current demangle implementation) are major ODR liabilities.  This is being built with exceptions turned off.  Client code can build with exceptions turned on.  Now, one process has two copies of some vector and string methods, some built with exceptions on and some with exceptions off.  This has actually bitten me in the past.


https://reviews.llvm.org/D20083





More information about the llvm-commits mailing list