address the comment
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Time | Test | |
---|---|---|
60,040 ms | x64 debian > libFuzzer.libFuzzer::value-profile-load.test |
Event Timeline
llvm/include/llvm/Demangle/ItaniumDemangle.h | ||
---|---|---|
1266–1272 | I am not sure if it's a good idea to modify this file without making corresponding changes to libcxxabi/src/demangle/ItaniumDemangle.h. Note that the comment at the beginning of the file says: // Generic itanium demangler library. // There are two copies of this file in the source tree. The one under // libcxxabi is the original and the one under llvm is the copy. Use // cp-to-llvm.sh to update the copy. See README.txt for more details. Also, we probably don't want to introduce dependence on llvm headers in libcxxabi/src/demangle/ItaniumDemangle.h. In turn, we probably shouldn't include llvm headers in llvm/include/llvm/Demangle/ItaniumDemangle.h either. | |
llvm/lib/ProfileData/InstrProfReader.cpp | ||
165 | I am not sure if this change improves readability. drop_end(buffer, buffer.size() - count) makes it harder to see the original intention that we iterate on the first count elements. That is, we would be asking readers to compute buffer.size() - (buffer.size() - count), which evaluates to count. I would be inclined to wait for std::ranges::views::take in C++20. If you really wanted to, you could implement an equivalent of std::ranges::take_view or something in llvm/include/llvm/ADT/STLExtras.h. |
I am not sure if it's a good idea to modify this file without making corresponding changes to libcxxabi/src/demangle/ItaniumDemangle.h. Note that the comment at the beginning of the file says:
Also, we probably don't want to introduce dependence on llvm headers in libcxxabi/src/demangle/ItaniumDemangle.h. In turn, we probably shouldn't include llvm headers in llvm/include/llvm/Demangle/ItaniumDemangle.h either.