Skip to content

Commit e92db54

Browse files
FractalFirantoyo
andauthored
Update src/consts.rs
Co-authored-by: antoyo <[email protected]>
1 parent 017e8c7 commit e92db54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl<'gcc, 'tcx> StaticCodegenMethods for CodegenCx<'gcc, 'tcx> {
4444
fn static_addr_of(&self, cv: RValue<'gcc>, align: Align, kind: Option<&str>) -> RValue<'gcc> {
4545
// TODO(antoyo): implement a proper rvalue comparison in libgccjit instead of doing the
4646
// following:
47-
for (value, variable) in &*self.const_globals.borrow() {
47+
if let Some(variable) = self.const_globals.borrow().get(cv) {
4848
if *value == cv {
4949
if let Some(global_variable) = self.global_lvalues.borrow().get(variable) {
5050
let alignment = align.bits() as i32;

0 commit comments

Comments
 (0)