diff options
| author | bors <bors@rust-lang.org> | 2022-12-12 16:00:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-12-12 16:00:14 +0000 |
| commit | 69f9c33d71c871fc16ac445211281c6e7a340943 (patch) | |
| tree | 348cdcec6049f68be8c2618d727b2facd1ccb857 /compiler/rustc_passes/src/reachable.rs | |
| parent | 0040709e39bfa159d099ee14628ad4ac72f91406 (diff) | |
| parent | c9aa73c3b141d04aeffe7ff359f0fe2d642ff2b1 (diff) | |
| download | rust-1.66.0.tar.gz rust-1.66.0.zip | |
Auto merge of #105563 - pietroalbini:pa-stable-1.66.0, r=pietroalbini 1.66.0
[stable] Prepare 1.66.0 release This PR prepares the artifacts for the 1.66.0 release. The following PRs have been backported: * #104782 * #105023 * #104558 * #104610 * #103989 * #104650 * #105539 * #105477 r? `@ghost`
Diffstat (limited to 'compiler/rustc_passes/src/reachable.rs')
| -rw-r--r-- | compiler/rustc_passes/src/reachable.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/rustc_passes/src/reachable.rs b/compiler/rustc_passes/src/reachable.rs index 10d5fc5d671..50070869ad9 100644 --- a/compiler/rustc_passes/src/reachable.rs +++ b/compiler/rustc_passes/src/reachable.rs @@ -116,6 +116,17 @@ impl<'tcx> Visitor<'tcx> for ReachableContext<'tcx> { intravisit::walk_expr(self, expr) } + + fn visit_inline_asm(&mut self, asm: &'tcx hir::InlineAsm<'tcx>, id: hir::HirId) { + for (op, _) in asm.operands { + if let hir::InlineAsmOperand::SymStatic { def_id, .. } = op { + if let Some(def_id) = def_id.as_local() { + self.reachable_symbols.insert(def_id); + } + } + } + intravisit::walk_inline_asm(self, asm, id); + } } impl<'tcx> ReachableContext<'tcx> { |
