Make the release build work
[oota-llvm.git] / lib / VMCore / InstrTypes.cpp
index a4c82126323047803bd0f2c3e66cdc678cfdf950..f42d633dbb8c0b6cdc97c6e74818ecc9b1c0c30e 100644 (file)
@@ -7,7 +7,7 @@
 #include "llvm/iOther.h"
 #include "llvm/iPHINode.h"
 #include "llvm/BasicBlock.h"
-#include "llvm/Method.h"
+#include "llvm/Function.h"
 #include "llvm/SymbolTable.h"
 #include "llvm/Type.h"
 #include <algorithm>  // find
@@ -27,12 +27,12 @@ TerminatorInst::TerminatorInst(const Type *Ty, Instruction::TermOps iType,
 
 
 //===----------------------------------------------------------------------===//
-//                            MethodArgument Class
+//                            FunctionArgument Class
 //===----------------------------------------------------------------------===//
 
 // Specialize setName to take care of symbol table majik
-void MethodArgument::setName(const std::string &name, SymbolTable *ST) {
-  Method *P;
+void FunctionArgument::setName(const std::string &name, SymbolTable *ST) {
+  Function *P;
   assert((ST == 0 || (!getParent() || ST == getParent()->getSymbolTable())) &&
         "Invalid symtab argument!");
   if ((P = getParent()) && hasName()) P->getSymbolTable()->remove(this);
@@ -59,6 +59,8 @@ PHINode::PHINode(const PHINode &PN)
 }
 
 void PHINode::addIncoming(Value *D, BasicBlock *BB) {
+  assert(getType() == D->getType() &&
+         "All operands to PHI node must be the same type as the PHI node!");
   Operands.push_back(Use(D, this));
   Operands.push_back(Use(BB, this));
 }