Skip to content

Commit 7ccc436

Browse files
committed
Fix for new TLS patch
1 parent d348830 commit 7ccc436

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

Cargo.lock

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/builder.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,10 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
810810
let atomic_load = self.context.get_builtin_function(&format!("__atomic_load_{}", size.bytes()));
811811
let ordering = self.context.new_rvalue_from_int(self.i32_type, order.to_gcc());
812812

813-
let volatile_const_void_ptr_type = self.context.new_type::<*mut ()>().make_const().make_volatile();
813+
let volatile_const_void_ptr_type = self.context.new_type::<()>()
814+
.make_const()
815+
.make_volatile()
816+
.make_pointer();
814817
let ptr = self.context.new_cast(None, ptr, volatile_const_void_ptr_type);
815818
self.context.new_call(None, atomic_load, &[ptr, ordering])
816819
}
@@ -935,7 +938,9 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
935938
// TODO(antoyo): handle alignment.
936939
let atomic_store = self.context.get_builtin_function(&format!("__atomic_store_{}", size.bytes()));
937940
let ordering = self.context.new_rvalue_from_int(self.i32_type, order.to_gcc());
938-
let volatile_const_void_ptr_type = self.context.new_type::<*mut ()>().make_const().make_volatile();
941+
let volatile_const_void_ptr_type = self.context.new_type::<()>()
942+
.make_volatile()
943+
.make_pointer();
939944
let ptr = self.context.new_cast(None, ptr, volatile_const_void_ptr_type);
940945

941946
// FIXME(antoyo): fix libgccjit to allow comparing an integer type with an aligned integer type because

0 commit comments

Comments
 (0)