Split the declarations in FuzzerDefs.h into the files: FuzzerIO.h, FuzzerUtil.h and FuzzerSHA1.h.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
I don't mind, but please at least explain the rationale.
Also, I see some leftovers from other patches, e.g. GetSeparator().
Please try to separate "refactoring, no-functionality change" patches from "change functionality" patches.
@kcc . Yes, you are right, I had included some changes here that should go in the next diff (Diff 3). I updated this diff to remove that changes. (And I will include that changes in the Diff 3).
In this diff, I only split the declarations in FuzzerDefs.h into the files: FuzzerIO.h, FuzzerUtil.h and FuzzerSHA1.h.
lib/Fuzzer/FuzzerCorpus.h | ||
---|---|---|
20 ↗ | (On Diff #79686) | Did you run clang-format on this patch? It's supposed to alphabetize headers, but these are not in alphabetical order here. |
LGTM
I think I know why you need this, but please update the description explicitly explaining the rationale.
And sort the headers as zturner@ asks.
lib/Fuzzer/FuzzerCorpus.h | ||
---|---|---|
20 ↗ | (On Diff #79686) | I got offline confirmation from kcc@ that running clang-format is not necessary. So you don't need to run clang-format |
@kcc , I separated the header file because it is better for code organization. Separating the functionalities in different logic units makes the code easier to understand and modify. So, each implementation only includes the interface of the unit that it needs to access, not all the declarations in one header file.
If we have only one header file like FuzzerDefs.h, when we need to look at the implementation of particular function, we don't have any idea in which file was implemented. Also, all implementations files include all the declarations in FuzzerDefs, so it is not clear which is the actual relation between the different implementations.