[Kaleidoscope] More inter-chapter diff reduction.
[oota-llvm.git] / examples / Kaleidoscope / Chapter4 / toy.cpp
index eba0ab1f27da369a3b43ff8836f25acafde22fe5..9b0d2ecf67c602ae29dcedad186f436d0f4ee33e 100644 (file)
@@ -642,7 +642,9 @@ Value *NumberExprAST::Codegen() {
 Value *VariableExprAST::Codegen() {
   // Look this variable up in the function.
   Value *V = NamedValues[Name];
-  return V ? V : ErrorV("Unknown variable name");
+  if (!V)
+    return ErrorV("Unknown variable name");
+  return V;
 }
 
 Value *BinaryExprAST::Codegen() {