about summary refs log tree commit diff
path: root/compiler/rustc_span/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-14 08:53:25 +0000
committerbors <bors@rust-lang.org>2023-11-14 08:53:25 +0000
commit5526682702c502626f5dc31f80d07f2b7339c81a (patch)
treed46b14fbc0e7e5262f42fb85439f4a6fc5195906 /compiler/rustc_span/src
parent173b6e686b158dbad7d072c64bef3ced2052312b (diff)
parent78da5776509f4e646a664de3ee7041f8008d5931 (diff)
downloadrust-5526682702c502626f5dc31f80d07f2b7339c81a.tar.gz
rust-5526682702c502626f5dc31f80d07f2b7339c81a.zip
Auto merge of #117330 - tmiasko:custom-mir-cleanup-blocks, r=cjgillot
Custom MIR: Support cleanup blocks

Cleanup blocks are declared with `bb (cleanup) = { ... }`.

`Call` and `Drop` terminators take an additional argument describing the unwind action, which is one of the following:

* `UnwindContinue()`
* `UnwindUnreachable()`
* `UnwindTerminate(reason)`, where reason is `ReasonAbi` or `ReasonInCleanup`
* `UnwindCleanup(block)`

Also support unwind resume and unwind terminate terminators:

* `UnwindResume()`
* `UnwindTerminate(reason)`
Diffstat (limited to 'compiler/rustc_span/src')
-rw-r--r--compiler/rustc_span/src/symbol.rs34
1 files changed, 34 insertions, 0 deletions
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs
index f287862cc23..302be85a429 100644
--- a/compiler/rustc_span/src/symbol.rs
+++ b/compiler/rustc_span/src/symbol.rs
@@ -124,6 +124,7 @@ symbols! {
     // There is currently no checking that all symbols are used; that would be
     // nice to have.
     Symbols {
+        Abi,
         AcqRel,
         Acquire,
         AddToDiagnostic,
@@ -166,6 +167,7 @@ symbols! {
         CString,
         Capture,
         Center,
+        Cleanup,
         Clone,
         Command,
         ConstParamTy,
@@ -215,6 +217,7 @@ symbols! {
         HashSet,
         Hasher,
         Implied,
+        InCleanup,
         IndexOutput,
         Input,
         Instant,
@@ -258,6 +261,7 @@ symbols! {
         NonZeroU8,
         NonZeroUsize,
         None,
+        Normal,
         Ok,
         Option,
         Ord,
@@ -1023,6 +1027,36 @@ symbols! {
         minnumf32,
         minnumf64,
         mips_target_feature,
+        mir_basic_block,
+        mir_call,
+        mir_cast_transmute,
+        mir_checked,
+        mir_copy_for_deref,
+        mir_debuginfo,
+        mir_deinit,
+        mir_discriminant,
+        mir_drop,
+        mir_field,
+        mir_goto,
+        mir_len,
+        mir_make_place,
+        mir_move,
+        mir_offset,
+        mir_retag,
+        mir_return,
+        mir_set_discriminant,
+        mir_static,
+        mir_static_mut,
+        mir_storage_dead,
+        mir_storage_live,
+        mir_unreachable,
+        mir_unwind_cleanup,
+        mir_unwind_continue,
+        mir_unwind_resume,
+        mir_unwind_terminate,
+        mir_unwind_terminate_reason,
+        mir_unwind_unreachable,
+        mir_variant,
         miri,
         misc,
         mmx_reg,