[llvm] Support forward-referenced globals with dso_local_equivalent
authorLeonard Chan <leonardchan@google.com>
Mon, 19 Sep 2022 23:22:14 +0000 (23:22 +0000)
committerLeonard Chan <leonardchan@google.com>
Wed, 21 Sep 2022 19:31:35 +0000 (19:31 +0000)
commit411020ad1c15a5f8cdbf674a2a8f845000f761e3
treeb55fd5b4c9f49852653119f8c70de36b8e43f911
parent52d7ce0cc1a57123ee27a0bff0530f89cab99ab7
[llvm] Support forward-referenced globals with dso_local_equivalent

See https://github.com/llvm/llvm-project/issues/57815.

dso_local_equivalent would fail with an assertion on forward-referenced
globals. This is an issue that only comes up in textual IR, which is why
we've never seen this assertion with clang.

Differential Revision: https://reviews.llvm.org/D134234
llvm/include/llvm/AsmParser/LLParser.h
llvm/lib/AsmParser/LLParser.cpp
llvm/test/CodeGen/X86/dso_local_equivalent.ll
llvm/test/CodeGen/X86/dso_local_equivalent_errors.ll [new file with mode: 0644]