[PATCH] D124504: Remove --no-opaque-pointers in test/cxx2a-thread-local-constinit.cpp

Chuanqi Xu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 27 00:31:22 PDT 2022

ChuanqiXu added a comment.

In D124504#3476537 <https://reviews.llvm.org/D124504#3476537>, @nikic wrote:

> How does it block your work? Tests currently still use `-no-opaque-pointers` to avoid breaking this mode. I think it's generally okay to drop the option, but I'm a bit unclear about the motivation in this case -- do you want to make a change that would be incompatible with typed pointers?

The motivation is that I want to insert an intrinsic for TLS variable. The whole background could be found at: https://discourse.llvm.org/t/address-thread-identification-problems-with-coroutine/62015

The signature of the intrinsic is `ptr @intrinsic.name(ptr)`. And I must add one bitcast if I can't use opaque-pointer. It looks like opaque pointer is enabled by default now: https://github.com/llvm/llvm-project/blob/86c770346c26ce4c9abf5a5b7ab4b5bbfdcf9d78/clang/include/clang/Driver/Options.td#L5567-L5573

So I feel like it is better to remove the `--no-opaque-pointers` option. I could add a bitcast to workaround if this is not wanted. Maybe the word `block` is not suitable here.

  rG LLVM Github Monorepo



More information about the cfe-commits mailing list