<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Aug 10, 2016 at 11:25 AM, Eugene Leviant <span dir="ltr"><<a href="mailto:evgeny.leviant@gmail.com" target="_blank">evgeny.leviant@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">evgeny777 added inline comments.<br>
<span class=""><br>
================<br>
Comment at: ELF/OutputSections.cpp:1687<br>
@@ -1678,1 +1686,3 @@<br>
 template <class ELFT><br>
+void BuildIdUuid<ELFT>::<wbr>writeBuildId(ArrayRef<<wbr>ArrayRef<uint8_t>> Bufs) {<br>
+#ifdef LLVM_ON_WIN32<br>
----------------<br>
</span><span class="">ruiu wrote:<br>
> evgeny777 wrote:<br>
> > ruiu wrote:<br>
> > > I'd add code to generate a RNG to LLVM rather than to LLD because it seems generic and should be useful in other places.<br>
> > You mean creating random GUID, don't you?<br>
> GUID is actually jus random 16 bytes, so maybe adding a function to create a GUID is too narrowly scoped. How about defining a function that returns truely random bytes of any length? Like<br>
><br>
>   std::vector<uint8_t> getRandomBytes(size_t Length);<br>
</span>There is a special routine on Windows which should be used to create GUID (UuidCreate). I'm afraid getRandomBytes is too generic for this particular case.<br></blockquote><div><br></div><div>What UuidCreate does is to populate a return value with random bytes, no? That function might make difference when UUID was defined to include a MAC address and a timestamp, but it is no longer the case, so I'm thinking that using that function to generate UUIDs is just a historical reason.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="https://reviews.llvm.org/D23349" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D23349</a><br>
<br>
<br>
<br>
</div></div></blockquote></div><br></div></div>