[llvm-commits] [llvm] r68978 - /llvm/trunk/examples/Kaleidoscope/toy.cpp

Bill Wendling isanbard at gmail.com
Mon Apr 13 12:45:05 PDT 2009


Author: void
Date: Mon Apr 13 14:45:05 2009
New Revision: 68978

URL: http://llvm.org/viewvc/llvm-project?rev=68978&view=rev
Log:
Get rid of some compile warnings.

Modified:
    llvm/trunk/examples/Kaleidoscope/toy.cpp

Modified: llvm/trunk/examples/Kaleidoscope/toy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/toy.cpp?rev=68978&r1=68977&r2=68978&view=diff

==============================================================================
--- llvm/trunk/examples/Kaleidoscope/toy.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/toy.cpp Mon Apr 13 14:45:05 2009
@@ -512,7 +512,7 @@
 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 @@
   
   // 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 @@
                                   "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.





More information about the llvm-commits mailing list