Remove unused field.
[oota-llvm.git] / lib / Transforms / IPO / MergeFunctions.cpp
index 1c6477c0223e723e584c73cf2d594e5d78efb29e..70345b833410d44778058f76ae36ec5bba1c2e5b 100644 (file)
 
 #define DEBUG_TYPE "mergefunc"
 #include "llvm/Transforms/IPO.h"
+#include "llvm/ADT/DenseSet.h"
+#include "llvm/ADT/FoldingSet.h"
+#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/SmallSet.h"
+#include "llvm/ADT/Statistic.h"
 #include "llvm/Constants.h"
+#include "llvm/DataLayout.h"
 #include "llvm/IRBuilder.h"
 #include "llvm/InlineAsm.h"
 #include "llvm/Instructions.h"
 #include "llvm/Module.h"
 #include "llvm/Operator.h"
 #include "llvm/Pass.h"
-#include "llvm/ADT/DenseSet.h"
-#include "llvm/ADT/FoldingSet.h"
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/SmallSet.h"
-#include "llvm/ADT/Statistic.h"
 #include "llvm/Support/CallSite.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/ValueHandle.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/DataLayout.h"
 #include <vector>
 using namespace llvm;
 
@@ -206,8 +206,9 @@ bool FunctionComparator::isEquivalentType(Type *Ty1,
     return true;
   if (Ty1->getTypeID() != Ty2->getTypeID()) {
     if (TD) {
-      if (isa<PointerType>(Ty1) && Ty2 == TD->getIntPtrType(Ty1)) return true;
-      if (isa<PointerType>(Ty2) && Ty1 == TD->getIntPtrType(Ty2)) return true;
+      LLVMContext &Ctx = Ty1->getContext();
+      if (isa<PointerType>(Ty1) && Ty2 == TD->getIntPtrType(Ctx)) return true;
+      if (isa<PointerType>(Ty2) && Ty1 == TD->getIntPtrType(Ctx)) return true;
     }
     return false;
   }