[PATCH] D103089: [Debug-Info][CodeView] Fix GUID string generation for MSVC generated objects.

Carlos Alberto Enciso via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 25 13:48:52 PDT 2021


CarlosAlbertoEnciso added a comment.

In D103089#2779878 <https://reviews.llvm.org/D103089#2779878>, @amccarth wrote:

> This sounds like an appropriate place to apply Postel's Law:  Be conservative in what you do, be liberal in what you accept from others.  I'm be happy to always generate uppercase hex digits when formatting a GUID to registry format, but maybe we should also consider accepting upper or lowercase when reading a formatted GUID.
>
> Some clarifications:
>
> - GUIDs are numbers not strings.  Microsoft claims they are essentially UUIDs (per RFC 4122).
>
> - The cited document is actually specific to the string representation of GUIDs as required by Windows Installer.  In fact, the braces indicate that it's the registry format.  Windows installer--and other tools that use formatted GUIDs as registry keys--do string comparisons rather than converting the string representation to a numeric GUID that can be compared directly.
>
> - The bit about using uppercase for the hex digits in the string representation does not apply everywhere, not even in the Microsoft world.  Microsoft's GUIDGEN tool formats GUIDs in various ways with respect to the case of the hex digits.  And in RFC 4122 says string representations of UUIDs should use lowercase.

@amccarth Thanks for your feedback.

I have to upload a correct patch to include the binary files (Using arcanist).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103089/new/

https://reviews.llvm.org/D103089



More information about the llvm-commits mailing list