This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed
Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -139,8 +139,8 @@ fn module_codegen(
139139 MonoItem :: Static ( def_id) => {
140140 crate :: constant:: codegen_static ( & mut cx. constants_cx , def_id)
141141 }
142- MonoItem :: GlobalAsm ( hir_id ) => {
143- let item = cx. tcx . hir ( ) . expect_item ( hir_id ) ;
142+ MonoItem :: GlobalAsm ( item_id ) => {
143+ let item = cx. tcx . hir ( ) . item ( item_id ) ;
144144 if let rustc_hir:: ItemKind :: GlobalAsm ( rustc_hir:: GlobalAsm { asm } ) = item. kind {
145145 cx. global_asm . push_str ( & * asm. as_str ( ) ) ;
146146 cx. global_asm . push_str ( "\n \n " ) ;
@@ -433,9 +433,5 @@ fn determine_cgu_reuse<'tcx>(tcx: TyCtxt<'tcx>, cgu: &CodegenUnit<'tcx>) -> CguR
433433 cgu. name( )
434434 ) ;
435435
436- if tcx. dep_graph . try_mark_green ( tcx, & dep_node) . is_some ( ) {
437- CguReuse :: PreLto
438- } else {
439- CguReuse :: No
440- }
436+ if tcx. try_mark_green ( & dep_node) { CguReuse :: PreLto } else { CguReuse :: No }
441437}
Original file line number Diff line number Diff line change @@ -76,10 +76,9 @@ pub(super) fn run_jit(tcx: TyCtxt<'_>, backend_config: BackendConfig) -> ! {
7676 MonoItem :: Static ( def_id) => {
7777 crate :: constant:: codegen_static ( & mut cx. constants_cx , def_id) ;
7878 }
79- MonoItem :: GlobalAsm ( hir_id) => {
80- let item = cx. tcx . hir ( ) . expect_item ( hir_id) ;
81- tcx. sess
82- . span_fatal ( item. span , "Global asm is not supported in JIT mode" ) ;
79+ MonoItem :: GlobalAsm ( item_id) => {
80+ let item = cx. tcx . hir ( ) . item ( item_id) ;
81+ tcx. sess . span_fatal ( item. span , "Global asm is not supported in JIT mode" ) ;
8382 }
8483 }
8584 }
You can’t perform that action at this time.
0 commit comments