Skip to content

Commit 4a97440

Browse files
committed
Feature gate call to get_size() for libgccjit 12
1 parent e7df0a4 commit 4a97440

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/builder.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,12 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
13261326
element_type
13271327
}
13281328
else {
1329-
self.cx.type_ix(element_type.get_size() as u64 * 8)
1329+
#[cfg(feature="master")]
1330+
{
1331+
self.cx.type_ix(element_type.get_size() as u64 * 8)
1332+
}
1333+
#[cfg(not(feature="master"))]
1334+
self.int_type
13301335
};
13311336
for i in 0..mask_num_units {
13321337
let field = struct_type.get_field(i as i32);

src/intrinsic/archs.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4275,8 +4275,5 @@ match name {
42754275
"llvm.xcore.getid" => "__builtin_getid",
42764276
"llvm.xcore.getps" => "__builtin_getps",
42774277
"llvm.xcore.setps" => "__builtin_setps",
4278-
_ => {
4279-
println!("***** unsupported LLVM intrinsic {}", name);
4280-
""
4281-
},
4278+
_ => unimplemented!("***** unsupported LLVM intrinsic {}", name),
42824279
}

0 commit comments

Comments
 (0)