[PATCH] Round 3: add unconditional support for block signatures

Thanks to Fariborz suggestion that I write a unit test I discovered that clang was not emitting the type signature information for global blocks.

While there I renamed his “types” field internally to “signature” to reflect its more natural name which I will be using in the runtime.

More significantly, I realized that we can recover the unused-by-the-runtime (1<<29) bit now that unconditionally mark (1<<30). This will enable the compiler to (re)use that bit sometime in the future.

Test “blocksignature.c” attached.

clang-4.patch (11.2 KB)

blocksignature.c (2.55 KB)

You want to remove #ifdef’ed out code in your test case.

Also, this test may or may not pass for 32bit mode. So, you may want to add something
like -triple x86_64-unknown-unknown to command line.

  • Fariborz

Yes, I remembered that moments after I sent out the patch.

blocksignature.c (3.09 KB)