llvm.org GIT mirror llvm / 1356c79
[Kaleidoscope] More inter-chapter diff reduction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245474 91177308-0d34-0410-b5e6-96231b3b80d8 Lang Hames 4 years ago
5 changed file(s) with 12 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
130130 Value *VariableExprAST::Codegen() {
131131 // Look this variable up in the function.
132132 Value *V = NamedValues[Name];
133 return V ? V : ErrorV("Unknown variable name");
133 if (!V)
134 ErrorV("Unknown variable name");
135 return V;
134136 }
135137
136138 References to variables are also quite simple using LLVM. In the simple
397397 Value *VariableExprAST::Codegen() {
398398 // Look this variable up in the function.
399399 Value *V = NamedValues[Name];
400 return V ? V : ErrorV("Unknown variable name");
400 if (!V)
401 return ErrorV("Unknown variable name");
402 return V;
401403 }
402404
403405 Value *BinaryExprAST::Codegen() {
641641 Value *VariableExprAST::Codegen() {
642642 // Look this variable up in the function.
643643 Value *V = NamedValues[Name];
644 return V ? V : ErrorV("Unknown variable name");
644 if (!V)
645 return ErrorV("Unknown variable name");
646 return V;
645647 }
646648
647649 Value *BinaryExprAST::Codegen() {
531531 Value *VariableExprAST::Codegen() {
532532 // Look this variable up in the function.
533533 Value *V = NamedValues[Name];
534 return V ? V : ErrorV("Unknown variable name");
534 if (!V)
535 return ErrorV("Unknown variable name");
536 return V;
535537 }
536538
537539 Value *BinaryExprAST::Codegen() {
625625 Value *V = NamedValues[Name];
626626 if (!V)
627627 return ErrorV("Unknown variable name");
628
629628 return V;
630629 }
631630