Remove ImmediateDominator analysis. The same information can be obtained from DomTre...
[oota-llvm.git] / lib / VMCore / Type.cpp
index 0e74f2e4f89b1d68accafcbaac9efee8b715f5ae..10063126e54d2c50f345128ff1806b83100e4f6a 100644 (file)
@@ -285,7 +285,7 @@ static std::string getTypeDescription(const Type *Ty,
            E = FTy->param_end(); I != E; ++I) {
       if (I != FTy->param_begin())
         Result += ", ";
-      if (Attrs && Attrs->getParamAttrs(Idx) != NoAttributeSet)
+      if (Attrs && Attrs->getParamAttrs(Idx) != ParamAttr::None)
         Result += Attrs->getParamAttrsTextByIndex(Idx);
       Idx++;
       Result += getTypeDescription(*I, TypeStack);
@@ -295,7 +295,7 @@ static std::string getTypeDescription(const Type *Ty,
       Result += "...";
     }
     Result += ")";
-    if (Attrs && Attrs->getParamAttrs(0) != NoAttributeSet) {
+    if (Attrs && Attrs->getParamAttrs(0) != ParamAttr::None) {
       Result += " " + Attrs->getParamAttrsTextByIndex(0);
     }
     break;
@@ -1098,7 +1098,11 @@ FunctionType *FunctionType::get(const Type *ReturnType,
 
   FunctionValType VT(ReturnType, Params, isVarArg, Attrs);
   FunctionType *MT = FunctionTypes->get(VT);
-  if (MT) return MT;
+  if (MT) { 
+    delete Attrs; // not needed any more
+    return MT;
+  }
+
 
   MT = (FunctionType*) new char[sizeof(FunctionType) + 
                                 sizeof(PATypeHandle)*(Params.size()+1)];
@@ -1117,7 +1121,7 @@ FunctionType::~FunctionType() {
 
 bool FunctionType::isStructReturn() const {
   if (ParamAttrs)
-    return ParamAttrs->paramHasAttr(1, StructRetAttribute);
+    return ParamAttrs->paramHasAttr(1, ParamAttr::StructRet);
   return false;
 }