[PATCH] D18213: Add a module Hash in the bitcode and the combined index.
Mehdi AMINI via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 30 08:03:01 PDT 2016
joker.eph added inline comments.
================
Comment at: test/Bitcode/module_hash.ll:7
@@ +6,3 @@
+
+; Check that the hash matches in the combined index
+
----------------
Came up with a different approach!
1) llvm-bcanalyzer will re-hash and check for mismatch
2) using a temporary file to collect the hash, I check that whatever is in the module is correctly propagated into the combined index.
================
Comment at: tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp:599
@@ +598,3 @@
+ // If we found a module hash, let's verify that it matches!
+ if (BlockID == bitc::MODULE_BLOCK_ID && Code == bitc::MODULE_CODE_HASH) {
+ if (Record.size() != 5)
----------------
I think the code a reused across Blocks, so you need to know that you are in a module block to interpret the code as being the hash. Did I misunderstand your point?
http://reviews.llvm.org/D18213
More information about the llvm-commits
mailing list