diff options
author | Kostya Serebryany <kcc@google.com> | 2012-01-20 17:57:16 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2012-01-20 17:57:16 +0000 |
commit | c891666f477bfee387c10a429038eb6d98e9d175 (patch) | |
tree | 4d168de8afc7429e4575afa8af5dc778ab86fe63 /lib/CodeGen/CGCall.cpp | |
parent | d9806c912ae3e870a733acfd83c26e8a1f6a5ffc (diff) |
use llvm:Attributes instead of unsigned
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148554 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index 72b40d3d59..1de8f0e3f9 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -733,8 +733,8 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, const Decl *TargetDecl, AttributeListType &PAL, unsigned &CallingConv) { - unsigned FuncAttrs = 0; - unsigned RetAttrs = 0; + llvm::Attributes FuncAttrs; + llvm::Attributes RetAttrs; CallingConv = FI.getEffectiveCallingConvention(); @@ -820,7 +820,7 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, ie = FI.arg_end(); it != ie; ++it) { QualType ParamType = it->type; const ABIArgInfo &AI = it->info; - unsigned Attributes = 0; + llvm::Attributes Attrs; // 'restrict' -> 'noalias' is done in EmitFunctionProlog when we // have the corresponding parameter variable. It doesn't make @@ -828,9 +828,9 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, switch (AI.getKind()) { case ABIArgInfo::Extend: if (ParamType->isSignedIntegerOrEnumerationType()) - Attributes |= llvm::Attribute::SExt; + Attrs |= llvm::Attribute::SExt; else if (ParamType->isUnsignedIntegerOrEnumerationType()) - Attributes |= llvm::Attribute::ZExt; + Attrs |= llvm::Attribute::ZExt; // FALL THROUGH case ABIArgInfo::Direct: if (RegParm > 0 && @@ -839,7 +839,7 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, RegParm -= (Context.getTypeSize(ParamType) + PointerWidth - 1) / PointerWidth; if (RegParm >= 0) - Attributes |= llvm::Attribute::InReg; + Attrs |= llvm::Attribute::InReg; } // FIXME: handle sseregparm someday... @@ -853,9 +853,9 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, case ABIArgInfo::Indirect: if (AI.getIndirectByVal()) - Attributes |= llvm::Attribute::ByVal; + Attrs |= llvm::Attribute::ByVal; - Attributes |= + Attrs |= llvm::Attribute::constructAlignmentFromInt(AI.getIndirectAlign()); // byval disables readnone and readonly. FuncAttrs &= ~(llvm::Attribute::ReadOnly | @@ -877,8 +877,8 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, } } - if (Attributes) - PAL.push_back(llvm::AttributeWithIndex::get(Index, Attributes)); + if (Attrs) + PAL.push_back(llvm::AttributeWithIndex::get(Index, Attrs)); ++Index; } if (FuncAttrs) |