[PATCH] D50828: Add profiling and canonicalization support to demangler nodes. No functionality change intended.

Erik Pilkington via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 16 13:24:13 PDT 2018


erik.pilkington added a comment.

Thanks for fixing up some of the `const` inconsistencies! I agree with you that it'd be nice to move all the profiling stuff to a separate file once the AST moves to a header, but I'm fine with doing that in a follow up.

How are you handling the circular dependency problem? Support depends on Demangle, and with this patch Demangle would now depend on Support, right?



================
Comment at: lib/Demangle/ItaniumDemangle.cpp:36
+#ifndef STANDALONE_DEMANGLER
+  void addString(llvm::FoldingSetNodeID &ID, StringView Str) {
+    ID.AddString(llvm::StringRef(Str.begin(), Str.size()));
----------------
nit: this shouldn't be indented.


================
Comment at: lib/Demangle/ItaniumDemangle.cpp:747
 
+  void profile(llvm::FoldingSetNodeID &ID) {
+    if (isEmpty()) {
----------------
`#ifndef STANDALONE_DEMANGLER`


Repository:
  rL LLVM

https://reviews.llvm.org/D50828





More information about the llvm-commits mailing list