[Kaleidoscope] More inter-chapter diff reduction.
[oota-llvm.git] / examples / Kaleidoscope / Chapter5 / toy.cpp
index c191d61d562ce20b2ce813d8b12d10c0899616fa..da7a81c6776f833e6708784c1428bc74b39cdcc9 100644 (file)
@@ -532,7 +532,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() {