Skip to content

Commit d04749e

Browse files
committed
Fix function names
1 parent bc46eb0 commit d04749e

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ path = "tests/lib.rs"
1414
harness = false
1515

1616
[dependencies]
17-
#gccjit = { git = "https://github.com/antoyo/gccjit.rs" }
17+
gccjit = { git = "https://github.com/antoyo/gccjit.rs" }
1818

1919
# Local copy.
20-
gccjit = { path = "../gccjit.rs" }
20+
#gccjit = { path = "../gccjit.rs" }
2121

2222
target-lexicon = "0.10.0"
2323

src/common.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use std::convert::TryFrom;
2-
use std::convert::TryInto;
32

43
use gccjit::LValue;
54
use gccjit::{Block, CType, RValue, Type, ToRValue};
@@ -44,7 +43,7 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
4443
let string = self.context.new_string_literal(&*string);
4544
let sym = self.generate_local_symbol_name("str");
4645
let global = self.declare_private_global(&sym, self.val_ty(string));
47-
global.global_set_initializer_value(string);
46+
global.global_set_initializer_rvalue(string);
4847
global
4948
// TODO(antoyo): set linkage.
5049
}
@@ -79,7 +78,7 @@ pub fn bytes_in_context<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, bytes: &[u8]) ->
7978
bytes.iter()
8079
.map(|&byte| context.new_rvalue_from_int(byte_type, byte as i32))
8180
.collect();
82-
context.new_rvalue_from_array(None, typ, &elements)
81+
context.new_array_constructor(None, typ, &elements)
8382
}
8483

8584
pub fn type_is_pointer<'gcc>(typ: Type<'gcc>) -> bool {

src/consts.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ impl<'gcc, 'tcx> StaticMethods for CodegenCx<'gcc, 'tcx> {
8181
else {
8282
value
8383
};
84-
global.global_set_initializer_value(value);
84+
global.global_set_initializer_rvalue(value);
8585

8686
// As an optimization, all shared statics which do not have interior
8787
// mutability are placed into read-only memory.
@@ -180,7 +180,7 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
180180
};
181181
// FIXME(antoyo): I think the name coming from generate_local_symbol_name() above cannot be used
182182
// globally.
183-
global.global_set_initializer_value(cv);
183+
global.global_set_initializer_rvalue(cv);
184184
// TODO(antoyo): set unnamed address.
185185
global.get_address(None)
186186
}
@@ -375,7 +375,7 @@ fn check_and_apply_linkage<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, attrs: &Codeg
375375
real_name.push_str(&sym);
376376
let global2 = cx.define_global(&real_name, llty, is_tls, attrs.link_section);
377377
// TODO(antoyo): set linkage.
378-
global2.global_set_initializer_value(global1.get_address(None));
378+
global2.global_set_initializer_rvalue(global1.get_address(None));
379379
// TODO(antoyo): use global_set_initializer() when it will work.
380380
global2
381381
}

src/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::cell::{Cell, RefCell};
22

3-
use gccjit::{Block, CType, Context, Field, Function, FunctionType, LValue, RValue, Struct, Type};
3+
use gccjit::{Block, CType, Context, Function, FunctionType, LValue, RValue, Struct, Type};
44
use rustc_codegen_ssa::base::wants_msvc_seh;
55
use rustc_codegen_ssa::traits::{
66
BackendTypes,

0 commit comments

Comments
 (0)