Skip to content

Commit

Permalink
update(compiler) fixed new warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb committed Nov 5, 2021
1 parent 190d670 commit d7bb25d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/compiler-llvm/src/translator/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1685,7 +1685,7 @@ pub fn tbaa_label<'ctx>(
.get_global_metadata("wasmer_tbaa_root")
.pop()
.unwrap_or_else(|| {
module.add_global_metadata("wasmer_tbaa_root", &context.metadata_node(&[]));
module.add_global_metadata("wasmer_tbaa_root", &context.metadata_node(&[])).unwrap();
module.get_global_metadata("wasmer_tbaa_root")[0]
});

Expand All @@ -1699,7 +1699,7 @@ pub fn tbaa_label<'ctx>(
module.add_global_metadata(
label.as_str(),
&context.metadata_node(&[type_label.into(), tbaa_root.into()]),
);
).unwrap();
module.get_global_metadata(label.as_str())[0]
});

Expand All @@ -1721,11 +1721,11 @@ pub fn tbaa_label<'ctx>(
type_tbaa.into(),
intrinsics.i64_zero.into(),
]),
);
).unwrap();
module.get_global_metadata(label.as_str())[0]
});

// Attach the access tag to the instruction.
let tbaa_kind = context.get_kind_id("tbaa");
instruction.set_metadata(type_tbaa, tbaa_kind);
instruction.set_metadata(type_tbaa, tbaa_kind).unwrap();
}

0 comments on commit d7bb25d

Please sign in to comment.