[PATCH] D50586: [Demangle] Add itaniumFindTypesInMangledName()

Erik Pilkington via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 13 09:20:51 PDT 2018


erik.pilkington added a comment.

In https://reviews.llvm.org/D50586#1197261, @sgraenitz wrote:

> For my use case in LLDB this is perfect and we would like to use the functionality at least for a time. Pavel is right that exposing the AST (or implementing a more general visitor pattern etc.) would be very useful for many things in LLDB and probably other places around LLVM too, but I only know little about the details yet. For a good design we should take proper time. If we do that and if it all works out, then in the end this function may become obsolete again, right. My proposal for this case would be to keep `FindTypesInMangledNameTest` and reimplement `itaniumFindTypesInMangledName` locally in the test file with whatever tools we have by that time. I am happy to make the effort.
>
> @erik.pilkington What do you think?


Sounds good! I'll commit this so you can move forward with the dependent patch.



================
Comment at: llvm/unittests/Demangle/FindTypesInMangledNameTest.cpp:33
+      +[](void *Ctx, const char *) { ++*static_cast<int *>(Ctx); }));
+  EXPECT_EQ(TC, 4); // pointer, reference, int, void.
+}
----------------
sgraenitz wrote:
> Well `f(int&*, void)` is maybe not the most practical example, but the mangled name alone should be valid :)
Oh, my mistake! I'll fix that in the commit.


https://reviews.llvm.org/D50586





More information about the llvm-commits mailing list