Fix panic when calling get_fn for a variable
This commit is contained in:
parent
ab7d138d16
commit
9b628f8e82
1 changed files with 2 additions and 0 deletions
|
@ -432,6 +432,8 @@ impl<'gcc, 'tcx> MiscMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
|
|||
|
||||
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…
Add table
Add a link
Reference in a new issue