Skip to content

Commit

Permalink
Merge wasmerio#931
Browse files Browse the repository at this point in the history
931: Build Metadata using the current Context. r=nlewycky a=nlewycky

Fixes wasmerio#927. Reverts wasmerio#928.


Co-authored-by: Nick Lewycky <[email protected]>
  • Loading branch information
bors[bot] and nlewycky authored Nov 5, 2019
2 parents bbcccaf + 1d8f2b7 commit 5f9670f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ middleware-cranelift:
cargo test --manifest-path lib/middleware-common-tests/Cargo.toml --release --features clif

middleware-llvm:
# TODO: remove workaround for https://github.com/wasmerio/wasmer/issues/927
cargo test --manifest-path lib/middleware-common-tests/Cargo.toml --release --features llvm -- --test-threads=1
cargo test --manifest-path lib/middleware-common-tests/Cargo.toml --release --features llvm

middleware: middleware-singlepass middleware-cranelift middleware-llvm

Expand Down
8 changes: 4 additions & 4 deletions lib/llvm-backend/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use inkwell::{
},
values::{
BasicValue, BasicValueEnum, FloatValue, FunctionValue, InstructionValue, IntValue,
MetadataValue, PointerValue, VectorValue,
PointerValue, VectorValue,
},
AddressSpace,
};
Expand Down Expand Up @@ -1218,7 +1218,7 @@ pub fn tbaa_label(
.get_global_metadata("wasmer_tbaa_root")
.pop()
.unwrap_or_else(|| {
module.add_global_metadata("wasmer_tbaa_root", &MetadataValue::create_node(&[]));
module.add_global_metadata("wasmer_tbaa_root", &context.metadata_node(&[]));
module.get_global_metadata("wasmer_tbaa_root")[0]
});

Expand All @@ -1236,7 +1236,7 @@ pub fn tbaa_label(
.unwrap_or_else(|| {
module.add_global_metadata(
label.as_str(),
&MetadataValue::create_node(&[type_label.into(), tbaa_root.into()]),
&context.metadata_node(&[type_label.into(), tbaa_root.into()]),
);
module.get_global_metadata(label.as_str())[0]
});
Expand All @@ -1254,7 +1254,7 @@ pub fn tbaa_label(
.unwrap_or_else(|| {
module.add_global_metadata(
label.as_str(),
&MetadataValue::create_node(&[
&context.metadata_node(&[
type_tbaa.into(),
type_tbaa.into(),
intrinsics.i64_zero.into(),
Expand Down

0 comments on commit 5f9670f

Please sign in to comment.