summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2008-12-19 09:38:31 +0000
committerNick Lewycky <nicholas@mxc.ca>2008-12-19 09:38:31 +0000
commit8d69f488331dbfebdb425d9ef3c03ab9bc655143 (patch)
treee1cac432682cf043d9c6768b1c5aada4a359f2a6 /llvm/lib/VMCore
parent2abb108f1b92ffa60dd8a89d3c90eddabb5ea76f (diff)
downloadbcm5719-llvm-8d69f488331dbfebdb425d9ef3c03ab9bc655143.tar.gz
bcm5719-llvm-8d69f488331dbfebdb425d9ef3c03ab9bc655143.zip
Commit missed files from nocapture change.
llvm-svn: 61240
Diffstat (limited to 'llvm/lib/VMCore')
-rw-r--r--llvm/lib/VMCore/Attributes.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/Attributes.cpp b/llvm/lib/VMCore/Attributes.cpp
index 92acc111be9..dd47814d97a 100644
--- a/llvm/lib/VMCore/Attributes.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud