X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FVMCore%2FAttributes.cpp;h=0f3efa7b9ddef7b4534a7e2ca9be962ad5e06441;hb=b5bd026a756d8650f2a94607c9b1dc34cf1c024a;hp=92acc111be952f21ddcc3b2570c525492ceb7757;hpb=e9e6bdf27fca46dc9eca2ebdf73e03747d1859ab;p=oota-llvm.git diff --git a/lib/VMCore/Attributes.cpp b/lib/VMCore/Attributes.cpp index 92acc111be9..0f3efa7b9dd 100644 --- a/lib/VMCore/Attributes.cpp +++ b/lib/VMCore/Attributes.cpp @@ -37,6 +37,8 @@ std::string Attribute::getAsString(Attributes Attrs) { Result += "inreg "; if (Attrs & Attribute::NoAlias) Result += "noalias "; + if (Attrs & Attribute::NoCapture) + Result += "nocapture "; if (Attrs & Attribute::StructRet) Result += "sret "; if (Attrs & Attribute::ByVal) @@ -59,10 +61,11 @@ std::string Attribute::getAsString(Attributes Attrs) { Result += "sspreq "; if (Attrs & Attribute::Alignment) { Result += "align "; - Result += utostr((Attrs & Attribute::Alignment) >> 16); + Result += utostr(Attribute::getAlignmentFromAttrs(Attrs)); Result += " "; } // Trim the trailing space. + assert(!Result.empty() && "Unknown attribute!"); Result.erase(Result.end()-1); return Result; } @@ -76,7 +79,7 @@ Attributes Attribute::typeIncompatible(const Type *Ty) { if (!isa(Ty)) // Attributes that only apply to pointers. - Incompatible |= ByVal | Nest | NoAlias | StructRet; + Incompatible |= ByVal | Nest | NoAlias | StructRet | NoCapture; return Incompatible; }