> On Jul 8, 2021, at 12:25 PM, Alex Langford via Phabricator > <revi...@reviews.llvm.org> wrote: > > bulbazord added a comment. > > In D105215#2850988 <https://reviews.llvm.org/D105215#2850988>, @jingham wrote: > >> In D105215#2850821 <https://reviews.llvm.org/D105215#2850821>, @bulbazord >> wrote: >> >>> I kind of feel that `Language::GetDemangledFunctionNameWithoutArguments` >>> may be a bit too specific for a generalized language plugins. I think it >>> may be worth it to make `Mangled` an interface that language plugins can >>> implement (e.g. `CPlusPlusMangledName`) but I haven't totally thought out >>> what the ramifications of that would be yet. >> >> The name is unfortunate, but the notion that function types have an >> identifier, that is then decorated by arguments and maybe return types, >> seems pretty common. So in this particular case, maybe we just need a >> better name? GetBaseName isn't right since this function also returns any >> namespace information. Maybe GetFullyQualifiedBaseName? > > This may be my ignorance of other languages speaking, but > `GetFullyQualifiedBaseName` sounds a little more specific to C++. I'm not > sure if other languages use this terminology, so I tried to keep it as > generic as possible. >
Many other languages (except for C and Fortran) have some notion of namespaces & classes which qualify a bare function identifier. And most have contexts in which you can use just the identifier and others where you can or have to include the namespace/class qualifiers. "FullyQualifiedBaseName" was my best shot at describing this difference. Mangling/Demangling seemed to me to have a more C++ specific flavor, and plus GetDemangledFunctionNameWithoutArguments only obliquely tells you you will be getting the full path to the name, which you infer because the C++ demangled name includes this info. But I was mostly arguing that the concept, which I understood to be "give me the full path to this identifier", is a general one, regardless of the name. Jim > > Repository: > rG LLVM Github Monorepo > > CHANGES SINCE LAST ACTION > https://reviews.llvm.org/D105215/new/ > > https://reviews.llvm.org/D105215 > _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits