[PATCH] D75545: [dsymutil] Fix template stripping in getDIENames(...) to account for overloaded operators
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 4 10:05:49 PST 2020
JDevlieghere added inline comments.
================
Comment at: llvm/lib/DWARFLinker/DWARFLinker.cpp:123
+namespace {
+Optional<StringRef> StripTemplateParameters(StringRef Name) {
----------------
For consistency with the other free functions in the cpp file, can you just make it static? This seems to be the default in llvm.
================
Comment at: llvm/lib/DWARFLinker/DWARFLinker.cpp:135
+ // How many < until we have the start of the template parameters.
+ size_t NumLeftAnglesToCount = 1;
+
----------------
I still think that `Skip` would be more meaningful than `Count`
================
Comment at: llvm/lib/DWARFLinker/DWARFLinker.cpp:152
+
+ return Name.substr(0,StartOfTemplate-1);
+}
----------------
Please clang format your patch before landing.
================
Comment at: llvm/lib/DWARFLinker/DWARFLinker.cpp:178
+ StringRef Name = Info.Name.getString();
+ Optional<StringRef> StrippedName = StripTemplateParameters(Name);
+
----------------
You can move this into the if:
```
if (Optional<StringRef> StrippedName = StripTemplateParameters(Name))
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75545/new/
https://reviews.llvm.org/D75545
More information about the llvm-commits
mailing list