Merge pull request #499 from rust-lang/fix/unreachable-in-get_fn
Fix panic when calling get_fn for a variable
This commit is contained in:
commit
9941c3590d
@ -432,6 +432,8 @@ fn get_fn_addr(&self, instance: Instance<'tcx>) -> RValue<'gcc> {
|
||||
|
||||
let func = if self.intrinsics.borrow().contains_key(func_name) {
|
||||
self.intrinsics.borrow()[func_name]
|
||||
} else if let Some(variable) = self.get_declared_value(func_name) {
|
||||
return variable;
|
||||
} else {
|
||||
get_fn(self, instance)
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user