forked from M-Labs/artiq
1
0
Fork 0

compiler: Remove provision for unused four-parameter llptr_to_var() form [nfc]

`var_type` was presumably intended to convert to a target type,
but wasn't actually acted on in the function body (nor was it
used anywhere in the codebase).
This commit is contained in:
David Nadlinger 2019-10-11 13:45:03 +01:00
parent f2f7170d20
commit 5d7f22ffa4
1 changed files with 2 additions and 3 deletions

View File

@ -719,9 +719,8 @@ class LLVMIRGenerator:
self.llbuilder.store(lloperand, llfieldptr)
return llalloc
def llptr_to_var(self, llenv, env_ty, var_name, var_type=None):
if var_name in env_ty.params and (var_type is None or
env_ty.params[var_name] == var_type):
def llptr_to_var(self, llenv, env_ty, var_name):
if var_name in env_ty.params:
var_index = list(env_ty.params.keys()).index(var_name)
return self.llbuilder.gep(llenv, [self.llindex(0), self.llindex(var_index)],
inbounds=True)