[PATCH] D40980: Add /DEBUG:GHASH option to LLD to speed up COFF linking
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 7 14:08:20 PST 2017
ruiu added inline comments.
================
Comment at: lld/COFF/PDB.cpp:262
+ std::vector<GloballyHashedType> OwnedHashes;
+ if (auto DebugH = getDebugH(File))
+ Hashes = getHashesFromDebugH(*DebugH);
----------------
zturner wrote:
> ruiu wrote:
> > auto -> Optional<ArrayRef<uint8_t>>
> I agree with your previous comment about changing `auto`, but this one is a bit longer, and when initialized inside the condition of an if statement, I think it's pretty idiomatic to use `auto`. So I would actually prefer to leave this one as is, but if you feel strongly I can still change it.
In lld even if it is a bit too long, we usually write the actual type name instead of auto, so I think I'd prefer doing the same thing here for consistency. Note that there are few exceptions to that policy, e.g. we write `auto Err` instead of `std::error_code Err`.
https://reviews.llvm.org/D40980
More information about the llvm-commits
mailing list