[PATCH] D123100: [Support/Hash functions] Change the `final()` and `result()` of the hashing functions to return an array of bytes
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 4 22:10:27 PDT 2022
Amir added inline comments.
================
Comment at: bolt/lib/Core/DebugData.cpp:823
Hasher.update(AbbrevData);
- StringRef Key = Hasher.final();
+ auto Hash = Hasher.final();
+ StringRef Key((const char *)Hash.data(), Hash.size());
----------------
I think it would be more in line with LLVM coding standards to expand `auto` in this case (and others) – see https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable.
My understanding is that `auto` is fine where the type is obvious from the context (is explicitly available on the same line e.g. with casts), is abstract (T::iterator types), or doesn't matter (e.g. lambdas).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123100/new/
https://reviews.llvm.org/D123100
More information about the llvm-commits
mailing list