[llvm-dev] Are unknown types now intentionally casual?

Nikita Popov via llvm-dev llvm-dev at lists.llvm.org
Mon Jan 10 05:48:11 PST 2022


On Sun, Jan 9, 2022 at 10:10 AM Nikita Popov <nikita.ppv at gmail.com> wrote:

> On Sun, Jan 9, 2022 at 6:29 AM Russell Wallace via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
>> ... no, when I feed the second output as input into clang again, it
>> objects to the undeclared type:
>>
>> (c1) C:\t>clang -mllvm -opaque-pointers 2.ll
>> 2.ll:6:38: error: use of undefined type named 'struct.Unknown'
>> @Unknown = external dso_local global %struct.Unknown, align 1
>>                                      ^
>> 1 error generated.
>>
>> So this seems to be just a bug in this particular version of clang,
>> probably because the opaque pointers conversion is still a work in progress?
>>
>
> Yes, this is a bug in the opaque pointers implementation. The TypeFinder
> does not find the struct type here, because it is neither reachable from
> the global type, nor the (absent) global initializer, but only from the
> global value type. We'll have to port some changes from the ValueEnumerator
> to the TypeFinder.
>

This should be fixed by
https://github.com/llvm/llvm-project/commit/2c0fb96254fef2509b66d75290fedafd4adede95.
Let me know if you encounter further issues.

Regards,
Nikita
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20220110/bbc1cbe1/attachment.html>


More information about the llvm-dev mailing list