Fix -Asserts build
[oota-llvm.git] / lib / AsmParser / LLParser.cpp
index a9d3c94391cb96f579ac3b2a44d36b5ae733d209..59725b7ac83f8fe04226ea796b6c6a9a60b753cd 100644 (file)
@@ -356,8 +356,7 @@ bool LLParser::ParseNamedType() {
   }
 
   // Inserting a name that is already defined, get the existing name.
-  const Type *Existing = M->getTypeByName(Name);
-  assert(Existing && "Conflict but no matching type?!");
+  assert(M->getTypeByName(Name) && "Conflict but no matching type?!");
 
   // Otherwise, this is an attempt to redefine a type, report the error.
   return Error(NameLoc, "redefinition of type named '" + Name + "' of type '" +
@@ -2792,10 +2791,6 @@ bool LLParser::ParseFunctionHeader(Function *&Fn, bool isDefine) {
   // Add all of the arguments we parsed to the function.
   Function::arg_iterator ArgIt = Fn->arg_begin();
   for (unsigned i = 0, e = ArgList.size(); i != e; ++i, ++ArgIt) {
-    // If we run out of arguments in the Function prototype, exit early.
-    // FIXME: REMOVE THIS IN LLVM 3.0, this is just for the mismatch case above.
-    if (ArgIt == Fn->arg_end()) break;
-    
     // If the argument has a name, insert it into the argument symbol table.
     if (ArgList[i].Name.empty()) continue;