public LLVMRegister GetVariable(string variableName) { var localVariablesBlockWithVar = LocalVariableBlocks.Where(b => b.ContainsKey(variableName)).LastOrDefault(); Debug.Assert(localVariablesBlockWithVar != null); LLVMRegister ret = localVariablesBlockWithVar[variableName]; return(ret); }
public void SetLLVMRegister(string variableName, ClepsType variableType, LLVMValueRef llvmValueRef) { var localVariablesBlockWithVar = LocalVariableBlocks.Where(b => b.ContainsKey(variableName)).LastOrDefault(); Debug.Assert(localVariablesBlockWithVar != null); LLVMRegister ret = localVariablesBlockWithVar[variableName]; Debug.Assert(ret.VariableType == variableType); localVariablesBlockWithVar[variableName] = new LLVMRegister(variableType, llvmValueRef); }