[PATCH] D115353: Verifier: accept enums as scopes

Augie Fackler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 8 08:16:00 PST 2021


durin42 created this revision.
durin42 added reviewers: ychen, dblaikie, aprantl, probinson.
Herald added subscribers: dexonsmith, JDevlieghere, hiraditya.
durin42 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Rust allows enums to be scopes, as shown by the previous change. Sadly,
D111770 <https://reviews.llvm.org/D111770> disallowed enums-as-scopes in the LLVM Verifier, which means
that LLVM HEAD stopped working for Rust compiles.  As a result, we back
out the verifier part of D111770 <https://reviews.llvm.org/D111770> with a modification to the testcase so
we don't break this in the future.

The testcase is now actual IR from rustc at commit 8f8092cc3, which is
the nightly as of 2021-09-28. I would expect rustc 1.57 to produce
similar or identical IR if someone wants to reproduce this IR in the
future with minimal changes. A recipe for reproducing the IR using rustc
is included in the test file.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D115353

Files:
  llvm/lib/IR/Verifier.cpp
  llvm/test/DebugInfo/dbg-rust-valid-enum-as-scope.ll
  llvm/test/Verifier/dbg-invalid-enum-as-scope.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115353.392787.patch
Type: text/x-patch
Size: 6836 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211208/3d168033/attachment.bin>


More information about the llvm-commits mailing list