[llvm] r182692 - ArrayRef-ize MD5 and clean up a few variable names.

Eric Christopher echristo at gmail.com
Fri May 24 22:04:18 PDT 2013


>>
>> +template <typename T> class ArrayRef;
>> +
>
>
> Is it legit to forward-declare this and then take an ArrayRef by value?

I think so? But I'm willing to defer to others here. If not we should
add a warning and fix a bunch of uses throughout llvm :)

>> +  void final(MD5Result &result);
>> +
>> +  static void stringifyResult(MD5Result &Res, SmallString<32> &Str);
>
>
> stringifyResult could use a comment describing what it does. My best guess
> is that it produces an ASCII hex digest, but it's not clear. If that is what
> it does, then just call it something with "ASCIIHexDigest" in the name.

It translates the bytes in the result to hex yes. I can update it with
a comment to this effect.

> Also, can it be a free function?

Eh? I guess it could be, but this seemed like an easy way of keeping
that I'd like some centralized way to dump this to a hex string. I'm
open to preferences here, I don't have any strong ones.

>
>
> Side note: on my system, adding the SmallString.h include pulls in over 25K
> lines of code :( (it's mostly through SmallVector.h) sigh...
>

Yeah, sorry.  I'm totally open to other ways to do the same thing.
This seemed to be the most compact and easiest, but I'm not wedded to
it either.

-eric



More information about the llvm-commits mailing list