diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2008-12-19 09:38:31 +0000 |
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2008-12-19 09:38:31 +0000 |
| commit | 73ddd4f00dd2a4b7b68a1500bc7e3322cab51270 (patch) | |
| tree | 0a97ae74fa5aeee55b2ec9bf7ef6c2296a8d94b5 /lib/VMCore/Attributes.cpp | |
| parent | f23d0d392ab47e191e1bbd17dc7487b9d461485c (diff) | |
Commit missed files from nocapture change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61240 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Attributes.cpp')
| -rw-r--r-- | lib/VMCore/Attributes.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/VMCore/Attributes.cpp b/lib/VMCore/Attributes.cpp index 92acc111be..dd47814d97 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(1ull << (((Attrs & Attribute::Alignment)>>16) - 1)); 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<PointerType>(Ty)) // Attributes that only apply to pointers. - Incompatible |= ByVal | Nest | NoAlias | StructRet; + Incompatible |= ByVal | Nest | NoAlias | StructRet | NoCapture; return Incompatible; } |
