Get rid of some compile warnings.
authorBill Wendling <isanbard@gmail.com>
Mon, 13 Apr 2009 19:45:05 +0000 (19:45 +0000)
committerBill Wendling <isanbard@gmail.com>
Mon, 13 Apr 2009 19:45:05 +0000 (19:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68978 91177308-0d34-0410-b5e6-96231b3b80d8

examples/Kaleidoscope/toy.cpp

index f28c274d570c9dd56e662641b3a6f5416ebb7d39..87950d7e91b9d7de402e62c373bf219800be8f3b 100644 (file)
@@ -512,7 +512,7 @@ static ExprAST *ParseExpression() {
 static PrototypeAST *ParsePrototype() {
   std::string FnName;
   
-  int Kind = 0;  // 0 = identifier, 1 = unary, 2 = binary.
+  unsigned Kind = 0;            // 0 = identifier, 1 = unary, 2 = binary.
   unsigned BinaryPrecedence = 30;
   
   switch (CurTok) {
@@ -791,7 +791,6 @@ Value *ForExprAST::Codegen() {
   
   // Make the new basic block for the loop header, inserting after current
   // block.
-  BasicBlock *PreheaderBB = Builder.GetInsertBlock();
   BasicBlock *LoopBB = BasicBlock::Create("loop", TheFunction);
   
   // Insert an explicit fall through from the current block to the LoopBB.
@@ -837,7 +836,6 @@ Value *ForExprAST::Codegen() {
                                   "loopcond");
   
   // Create the "after loop" block and insert it.
-  BasicBlock *LoopEndBB = Builder.GetInsertBlock();
   BasicBlock *AfterBB = BasicBlock::Create("afterloop", TheFunction);
   
   // Insert the conditional branch into the end of LoopEndBB.