[Kaleidoscope] More inter-chapter diff reduction.
[oota-llvm.git] / examples / Kaleidoscope / Chapter3 / toy.cpp
index 29914aa03311cece6fe6f2ae8e5461ace2c688b3..cb4f75f7917debd5dd7ee00c94a49f00163740bf 100644 (file)
@@ -398,7 +398,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() {