r228592 - Add the hostname to the module hash to avoid sharing between hosts

Chandler Carruth chandlerc at google.com
Mon Feb 9 11:40:39 PST 2015


Nits:

On Mon, Feb 9, 2015 at 11:23 AM, Ben Langmuir <blangmuir at apple.com> wrote:

> +  char hostname[256];
> +  hostname[255] = 0;
> +  hostname[0] = 0;
> +  gethostname(hostname, 255);
>

It would be good to document that we want to actively ignore any error here.

Also, pedantically you should set [255] to 0 here rather than above. POSIX
doesn't require null termination in the event it is truncated.

+  code = hash_combine(code, StringRef(hostname));
> +#endif
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150209/51c410b1/attachment.html>


More information about the cfe-commits mailing list