Result += "inreg ";
if (Attrs & Attribute::NoAlias)
Result += "noalias ";
+ if (Attrs & Attribute::NoCapture)
+ Result += "nocapture ";
if (Attrs & Attribute::StructRet)
Result += "sret ";
if (Attrs & Attribute::ByVal)
Result += "sspreq ";
if (Attrs & Attribute::Alignment) {
Result += "align ";
- Result += utostr((Attrs & Attribute::Alignment) >> 16);
+ Result += utostr(1ull << ((Attrs & Attribute::Alignment)>>16));
Result += " ";
}
// Trim the trailing space.
+ assert(!Result.empty() && "Unknown attribute!");
Result.erase(Result.end()-1);
return Result;
}
if (!isa<PointerType>(Ty))
// Attributes that only apply to pointers.
- Incompatible |= ByVal | Nest | NoAlias | StructRet;
+ Incompatible |= ByVal | Nest | NoAlias | StructRet | NoCapture;
return Incompatible;
}