about summary refs log tree commit diff
path: root/compiler/rustc_hir/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-10-09 11:56:00 +0200
committerGitHub <noreply@github.com>2021-10-09 11:56:00 +0200
commit5ebb6a8fd93eb559eb8e00a7947fbc4ad7e63580 (patch)
treee3ded26518dd7525d457220464c84b019eee3350 /compiler/rustc_hir/src
parent9d14b6505b3cbe47826c8f4d62f67f0e5e474750 (diff)
parent271da7d8bc9f0f5ca98cdfeb999872a7a0b6cf74 (diff)
Rollup merge of #89641 - asquared31415:asm-feature-attr-regs, r=oli-obk
make #[target_feature] work with `asm` register classes

Fixes #89289
Diffstat (limited to 'compiler/rustc_hir/src')
-rw-r--r--compiler/rustc_hir/src/hir.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs
index fdd52bd7495..5264f7cc326 100644
--- a/compiler/rustc_hir/src/hir.rs
+++ b/compiler/rustc_hir/src/hir.rs
@@ -2293,6 +2293,13 @@ impl<'hir> InlineAsmOperand<'hir> {
             Self::Const { .. } | Self::Sym { .. } => None,
         }
     }
+
+    pub fn is_clobber(&self) -> bool {
+        matches!(
+            self,
+            InlineAsmOperand::Out { reg: InlineAsmRegOrRegClass::Reg(_), late: _, expr: None }
+        )
+    }
 }
 
 #[derive(Debug, HashStable_Generic)]