[PATCH] llvm-cov: Updated file checksum to be timestamp.

Yuchen Wu yuchenericwu at hotmail.com
Mon Nov 18 22:51:31 PST 2013


> + void setCfgChecksum(uint32_t Checksum) { 
> + CfgChecksum = Checksum; 
> + } 
> 
> This function appears to be unused? 

Oh, nice catch! I forgot to call this function after the file checksum was computed.

> + FileChecksum = zlib::crc32(EdgeDestinations); 
> 
> Oof. So, if we don't link in zlib when building llvm, this is undefined 
> behaviour on the spot (it isn't even guaranteed to terminate, it uses 
> llvm_unreachable). 
> 
> There's no need to use a crc32 here, just use whatever is in ADT/Hashing.h. 

Okay, done.

> LGTM with above fixed. 
> 
> Nick 

I've also attached the patches for the function checksums. As you suggested, it hashes the function name and line number.

-Yuchen 		 	   		  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-compiler-rt-Added-support-for-function-checksums.patch
Type: application/octet-stream
Size: 1236 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131119/7b7ea30b/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0022-llvm-cov-Added-function-checksums-for-gcno-and-gcda-.patch
Type: application/octet-stream
Size: 15225 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131119/7b7ea30b/attachment-0001.obj>


More information about the llvm-commits mailing list