Changes in directory llvm/lib/AsmParser:
llvmAsmParser.cpp.cvs updated: 1.82 -> 1.83 llvmAsmParser.y updated: 1.337 -> 1.338 llvmAsmParser.y.cvs updated: 1.83 -> 1.84 --- Log message: For PR1146: http://llvm.org/PR1146 : Put the parameter attributes in their own ParamAttr name space. Adjust the rest of llvm as a result. --- Diffs of the changes: (+66 -66) llvmAsmParser.cpp.cvs | 44 ++++++++++++++++++++++---------------------- llvmAsmParser.y | 44 ++++++++++++++++++++++---------------------- llvmAsmParser.y.cvs | 44 ++++++++++++++++++++++---------------------- 3 files changed, 66 insertions(+), 66 deletions(-) Index: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.82 llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.83 --- llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.82 Mon Apr 9 01:13:29 2007 +++ llvm/lib/AsmParser/llvmAsmParser.cpp.cvs Tue Apr 10 21:44:19 2007 @@ -3337,27 +3337,27 @@ case 93: #line 1192 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" - { (yyval.ParamAttrs) = ZExtAttribute; ;} + { (yyval.ParamAttrs) = ParamAttr::ZExt; ;} break; case 94: #line 1193 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" - { (yyval.ParamAttrs) = SExtAttribute; ;} + { (yyval.ParamAttrs) = ParamAttr::SExt; ;} break; case 95: #line 1194 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" - { (yyval.ParamAttrs) = InRegAttribute; ;} + { (yyval.ParamAttrs) = ParamAttr::InReg; ;} break; case 96: #line 1195 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" - { (yyval.ParamAttrs) = StructRetAttribute; ;} + { (yyval.ParamAttrs) = ParamAttr::StructRet; ;} break; case 97: #line 1198 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" - { (yyval.ParamAttrs) = NoAttributeSet; ;} + { (yyval.ParamAttrs) = ParamAttr::None; ;} break; case 98: @@ -3369,17 +3369,17 @@ case 99: #line 1204 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" - { (yyval.ParamAttrs) = NoReturnAttribute; ;} + { (yyval.ParamAttrs) = ParamAttr::NoReturn; ;} break; case 100: #line 1205 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" - { (yyval.ParamAttrs) = NoUnwindAttribute; ;} + { (yyval.ParamAttrs) = ParamAttr::NoUnwind; ;} break; case 102: #line 1209 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" - { (yyval.ParamAttrs) = NoAttributeSet; ;} + { (yyval.ParamAttrs) = ParamAttr::None; ;} break; case 103: @@ -3522,7 +3522,7 @@ { std::vector<const Type*> Params; ParamAttrsList Attrs; - if ((yyvsp[0].ParamAttrs) != NoAttributeSet) + if ((yyvsp[0].ParamAttrs) != ParamAttr::None) Attrs.addAttributes(0, (yyvsp[0].ParamAttrs)); unsigned index = 1; TypeWithAttrsList::iterator I = (yyvsp[-2].TypeWithAttrsList)->begin(), E = (yyvsp[-2].TypeWithAttrsList)->end(); @@ -3530,7 +3530,7 @@ const Type *Ty = I->Ty->get(); Params.push_back(Ty); if (Ty != Type::VoidTy) - if (I->Attrs != NoAttributeSet) + if (I->Attrs != ParamAttr::None) Attrs.addAttributes(index, I->Attrs); } bool isVarArg = Params.size() && Params.back() == Type::VoidTy; @@ -3552,7 +3552,7 @@ { std::vector<const Type*> Params; ParamAttrsList Attrs; - if ((yyvsp[0].ParamAttrs) != NoAttributeSet) + if ((yyvsp[0].ParamAttrs) != ParamAttr::None) Attrs.addAttributes(0, (yyvsp[0].ParamAttrs)); TypeWithAttrsList::iterator I = (yyvsp[-2].TypeWithAttrsList)->begin(), E = (yyvsp[-2].TypeWithAttrsList)->end(); unsigned index = 1; @@ -3560,7 +3560,7 @@ const Type* Ty = I->Ty->get(); Params.push_back(Ty); if (Ty != Type::VoidTy) - if (I->Attrs != NoAttributeSet) + if (I->Attrs != ParamAttr::None) Attrs.addAttributes(index, I->Attrs); } bool isVarArg = Params.size() && Params.back() == Type::VoidTy; @@ -3693,7 +3693,7 @@ #line 1431 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList)=(yyvsp[-2].TypeWithAttrsList); - TypeWithAttrs TWA; TWA.Attrs = NoAttributeSet; + TypeWithAttrs TWA; TWA.Attrs = ParamAttr::None; TWA.Ty = new PATypeHolder(Type::VoidTy); (yyval.TypeWithAttrsList)->push_back(TWA); CHECK_FOR_ERROR @@ -3704,7 +3704,7 @@ #line 1438 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList; - TypeWithAttrs TWA; TWA.Attrs = NoAttributeSet; + TypeWithAttrs TWA; TWA.Attrs = ParamAttr::None; TWA.Ty = new PATypeHolder(Type::VoidTy); (yyval.TypeWithAttrsList)->push_back(TWA); CHECK_FOR_ERROR @@ -4578,7 +4578,7 @@ struct ArgListEntry E; E.Ty = new PATypeHolder(Type::VoidTy); E.Name = 0; - E.Attrs = NoAttributeSet; + E.Attrs = ParamAttr::None; (yyval.ArgList)->push_back(E); CHECK_FOR_ERROR ;} @@ -4591,7 +4591,7 @@ struct ArgListEntry E; E.Ty = new PATypeHolder(Type::VoidTy); E.Name = 0; - E.Attrs = NoAttributeSet; + E.Attrs = ParamAttr::None; (yyval.ArgList)->push_back(E); CHECK_FOR_ERROR ;} @@ -4619,7 +4619,7 @@ std::vector<const Type*> ParamTypeList; ParamAttrsList ParamAttrs; - if ((yyvsp[-2].ParamAttrs) != NoAttributeSet) + if ((yyvsp[-2].ParamAttrs) != ParamAttr::None) ParamAttrs.addAttributes(0, (yyvsp[-2].ParamAttrs)); if ((yyvsp[-4].ArgList)) { // If there are arguments... unsigned index = 1; @@ -4629,7 +4629,7 @@ GEN_ERROR("Reference to abstract argument: " + Ty->getDescription()); ParamTypeList.push_back(Ty); if (Ty != Type::VoidTy) - if (I->Attrs != NoAttributeSet) + if (I->Attrs != ParamAttr::None) ParamAttrs.addAttributes(index, I->Attrs); } } @@ -5075,7 +5075,7 @@ // Pull out the types of all of the arguments... std::vector<const Type*> ParamTypes; ParamAttrsList ParamAttrs; - if ((yyvsp[-6].ParamAttrs) != NoAttributeSet) + if ((yyvsp[-6].ParamAttrs) != ParamAttr::None) ParamAttrs.addAttributes(0, (yyvsp[-6].ParamAttrs)); ValueRefList::iterator I = (yyvsp[-8].ValueRefList)->begin(), E = (yyvsp[-8].ValueRefList)->end(); unsigned index = 1; @@ -5084,7 +5084,7 @@ if (Ty == Type::VoidTy) GEN_ERROR("Short call syntax cannot be used with varargs"); ParamTypes.push_back(Ty); - if (I->Attrs != NoAttributeSet) + if (I->Attrs != ParamAttr::None) ParamAttrs.addAttributes(index, I->Attrs); } @@ -5471,7 +5471,7 @@ // Pull out the types of all of the arguments... std::vector<const Type*> ParamTypes; ParamAttrsList ParamAttrs; - if ((yyvsp[0].ParamAttrs) != NoAttributeSet) + if ((yyvsp[0].ParamAttrs) != ParamAttr::None) ParamAttrs.addAttributes(0, (yyvsp[0].ParamAttrs)); unsigned index = 1; ValueRefList::iterator I = (yyvsp[-2].ValueRefList)->begin(), E = (yyvsp[-2].ValueRefList)->end(); @@ -5480,7 +5480,7 @@ if (Ty == Type::VoidTy) GEN_ERROR("Short call syntax cannot be used with varargs"); ParamTypes.push_back(Ty); - if (I->Attrs != NoAttributeSet) + if (I->Attrs != ParamAttr::None) ParamAttrs.addAttributes(index, I->Attrs); } Index: llvm/lib/AsmParser/llvmAsmParser.y diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.337 llvm/lib/AsmParser/llvmAsmParser.y:1.338 --- llvm/lib/AsmParser/llvmAsmParser.y:1.337 Mon Apr 9 01:13:07 2007 +++ llvm/lib/AsmParser/llvmAsmParser.y Tue Apr 10 21:44:19 2007 @@ -1189,24 +1189,24 @@ CHECK_FOR_ERROR }; -ParamAttr : ZEXT { $$ = ZExtAttribute; } - | SEXT { $$ = SExtAttribute; } - | INREG { $$ = InRegAttribute; } - | SRET { $$ = StructRetAttribute; } +ParamAttr : ZEXT { $$ = ParamAttr::ZExt; } + | SEXT { $$ = ParamAttr::SExt; } + | INREG { $$ = ParamAttr::InReg; } + | SRET { $$ = ParamAttr::StructRet; } ; -OptParamAttrs : /* empty */ { $$ = NoAttributeSet; } +OptParamAttrs : /* empty */ { $$ = ParamAttr::None; } | OptParamAttrs ParamAttr { $$ = $1 | $2; } ; -FuncAttr : NORETURN { $$ = NoReturnAttribute; } - | NOUNWIND { $$ = NoUnwindAttribute; } +FuncAttr : NORETURN { $$ = ParamAttr::NoReturn; } + | NOUNWIND { $$ = ParamAttr::NoUnwind; } | ParamAttr ; -OptFuncAttrs : /* empty */ { $$ = NoAttributeSet; } +OptFuncAttrs : /* empty */ { $$ = ParamAttr::None; } | OptFuncAttrs FuncAttr { $$ = $1 | $2; } @@ -1298,7 +1298,7 @@ | Types '(' ArgTypeListI ')' OptFuncAttrs { std::vector<const Type*> Params; ParamAttrsList Attrs; - if ($5 != NoAttributeSet) + if ($5 != ParamAttr::None) Attrs.addAttributes(0, $5); unsigned index = 1; TypeWithAttrsList::iterator I = $3->begin(), E = $3->end(); @@ -1306,7 +1306,7 @@ const Type *Ty = I->Ty->get(); Params.push_back(Ty); if (Ty != Type::VoidTy) - if (I->Attrs != NoAttributeSet) + if (I->Attrs != ParamAttr::None) Attrs.addAttributes(index, I->Attrs); } bool isVarArg = Params.size() && Params.back() == Type::VoidTy; @@ -1324,7 +1324,7 @@ | VOID '(' ArgTypeListI ')' OptFuncAttrs { std::vector<const Type*> Params; ParamAttrsList Attrs; - if ($5 != NoAttributeSet) + if ($5 != ParamAttr::None) Attrs.addAttributes(0, $5); TypeWithAttrsList::iterator I = $3->begin(), E = $3->end(); unsigned index = 1; @@ -1332,7 +1332,7 @@ const Type* Ty = I->Ty->get(); Params.push_back(Ty); if (Ty != Type::VoidTy) - if (I->Attrs != NoAttributeSet) + if (I->Attrs != ParamAttr::None) Attrs.addAttributes(index, I->Attrs); } bool isVarArg = Params.size() && Params.back() == Type::VoidTy; @@ -1430,14 +1430,14 @@ : ArgTypeList | ArgTypeList ',' DOTDOTDOT { $$=$1; - TypeWithAttrs TWA; TWA.Attrs = NoAttributeSet; + TypeWithAttrs TWA; TWA.Attrs = ParamAttr::None; TWA.Ty = new PATypeHolder(Type::VoidTy); $$->push_back(TWA); CHECK_FOR_ERROR } | DOTDOTDOT { $$ = new TypeWithAttrsList; - TypeWithAttrs TWA; TWA.Attrs = NoAttributeSet; + TypeWithAttrs TWA; TWA.Attrs = ParamAttr::None; TWA.Ty = new PATypeHolder(Type::VoidTy); $$->push_back(TWA); CHECK_FOR_ERROR @@ -2100,7 +2100,7 @@ struct ArgListEntry E; E.Ty = new PATypeHolder(Type::VoidTy); E.Name = 0; - E.Attrs = NoAttributeSet; + E.Attrs = ParamAttr::None; $$->push_back(E); CHECK_FOR_ERROR } @@ -2109,7 +2109,7 @@ struct ArgListEntry E; E.Ty = new PATypeHolder(Type::VoidTy); E.Name = 0; - E.Attrs = NoAttributeSet; + E.Attrs = ParamAttr::None; $$->push_back(E); CHECK_FOR_ERROR } @@ -2131,7 +2131,7 @@ std::vector<const Type*> ParamTypeList; ParamAttrsList ParamAttrs; - if ($7 != NoAttributeSet) + if ($7 != ParamAttr::None) ParamAttrs.addAttributes(0, $7); if ($5) { // If there are arguments... unsigned index = 1; @@ -2141,7 +2141,7 @@ GEN_ERROR("Reference to abstract argument: " + Ty->getDescription()); ParamTypeList.push_back(Ty); if (Ty != Type::VoidTy) - if (I->Attrs != NoAttributeSet) + if (I->Attrs != ParamAttr::None) ParamAttrs.addAttributes(index, I->Attrs); } } @@ -2486,7 +2486,7 @@ // Pull out the types of all of the arguments... std::vector<const Type*> ParamTypes; ParamAttrsList ParamAttrs; - if ($8 != NoAttributeSet) + if ($8 != ParamAttr::None) ParamAttrs.addAttributes(0, $8); ValueRefList::iterator I = $6->begin(), E = $6->end(); unsigned index = 1; @@ -2495,7 +2495,7 @@ if (Ty == Type::VoidTy) GEN_ERROR("Short call syntax cannot be used with varargs"); ParamTypes.push_back(Ty); - if (I->Attrs != NoAttributeSet) + if (I->Attrs != ParamAttr::None) ParamAttrs.addAttributes(index, I->Attrs); } @@ -2792,7 +2792,7 @@ // Pull out the types of all of the arguments... std::vector<const Type*> ParamTypes; ParamAttrsList ParamAttrs; - if ($8 != NoAttributeSet) + if ($8 != ParamAttr::None) ParamAttrs.addAttributes(0, $8); unsigned index = 1; ValueRefList::iterator I = $6->begin(), E = $6->end(); @@ -2801,7 +2801,7 @@ if (Ty == Type::VoidTy) GEN_ERROR("Short call syntax cannot be used with varargs"); ParamTypes.push_back(Ty); - if (I->Attrs != NoAttributeSet) + if (I->Attrs != ParamAttr::None) ParamAttrs.addAttributes(index, I->Attrs); } Index: llvm/lib/AsmParser/llvmAsmParser.y.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.83 llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.84 --- llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.83 Mon Apr 9 01:13:29 2007 +++ llvm/lib/AsmParser/llvmAsmParser.y.cvs Tue Apr 10 21:44:19 2007 @@ -1189,24 +1189,24 @@ CHECK_FOR_ERROR }; -ParamAttr : ZEXT { $$ = ZExtAttribute; } - | SEXT { $$ = SExtAttribute; } - | INREG { $$ = InRegAttribute; } - | SRET { $$ = StructRetAttribute; } +ParamAttr : ZEXT { $$ = ParamAttr::ZExt; } + | SEXT { $$ = ParamAttr::SExt; } + | INREG { $$ = ParamAttr::InReg; } + | SRET { $$ = ParamAttr::StructRet; } ; -OptParamAttrs : /* empty */ { $$ = NoAttributeSet; } +OptParamAttrs : /* empty */ { $$ = ParamAttr::None; } | OptParamAttrs ParamAttr { $$ = $1 | $2; } ; -FuncAttr : NORETURN { $$ = NoReturnAttribute; } - | NOUNWIND { $$ = NoUnwindAttribute; } +FuncAttr : NORETURN { $$ = ParamAttr::NoReturn; } + | NOUNWIND { $$ = ParamAttr::NoUnwind; } | ParamAttr ; -OptFuncAttrs : /* empty */ { $$ = NoAttributeSet; } +OptFuncAttrs : /* empty */ { $$ = ParamAttr::None; } | OptFuncAttrs FuncAttr { $$ = $1 | $2; } @@ -1298,7 +1298,7 @@ | Types '(' ArgTypeListI ')' OptFuncAttrs { std::vector<const Type*> Params; ParamAttrsList Attrs; - if ($5 != NoAttributeSet) + if ($5 != ParamAttr::None) Attrs.addAttributes(0, $5); unsigned index = 1; TypeWithAttrsList::iterator I = $3->begin(), E = $3->end(); @@ -1306,7 +1306,7 @@ const Type *Ty = I->Ty->get(); Params.push_back(Ty); if (Ty != Type::VoidTy) - if (I->Attrs != NoAttributeSet) + if (I->Attrs != ParamAttr::None) Attrs.addAttributes(index, I->Attrs); } bool isVarArg = Params.size() && Params.back() == Type::VoidTy; @@ -1324,7 +1324,7 @@ | VOID '(' ArgTypeListI ')' OptFuncAttrs { std::vector<const Type*> Params; ParamAttrsList Attrs; - if ($5 != NoAttributeSet) + if ($5 != ParamAttr::None) Attrs.addAttributes(0, $5); TypeWithAttrsList::iterator I = $3->begin(), E = $3->end(); unsigned index = 1; @@ -1332,7 +1332,7 @@ const Type* Ty = I->Ty->get(); Params.push_back(Ty); if (Ty != Type::VoidTy) - if (I->Attrs != NoAttributeSet) + if (I->Attrs != ParamAttr::None) Attrs.addAttributes(index, I->Attrs); } bool isVarArg = Params.size() && Params.back() == Type::VoidTy; @@ -1430,14 +1430,14 @@ : ArgTypeList | ArgTypeList ',' DOTDOTDOT { $$=$1; - TypeWithAttrs TWA; TWA.Attrs = NoAttributeSet; + TypeWithAttrs TWA; TWA.Attrs = ParamAttr::None; TWA.Ty = new PATypeHolder(Type::VoidTy); $$->push_back(TWA); CHECK_FOR_ERROR } | DOTDOTDOT { $$ = new TypeWithAttrsList; - TypeWithAttrs TWA; TWA.Attrs = NoAttributeSet; + TypeWithAttrs TWA; TWA.Attrs = ParamAttr::None; TWA.Ty = new PATypeHolder(Type::VoidTy); $$->push_back(TWA); CHECK_FOR_ERROR @@ -2100,7 +2100,7 @@ struct ArgListEntry E; E.Ty = new PATypeHolder(Type::VoidTy); E.Name = 0; - E.Attrs = NoAttributeSet; + E.Attrs = ParamAttr::None; $$->push_back(E); CHECK_FOR_ERROR } @@ -2109,7 +2109,7 @@ struct ArgListEntry E; E.Ty = new PATypeHolder(Type::VoidTy); E.Name = 0; - E.Attrs = NoAttributeSet; + E.Attrs = ParamAttr::None; $$->push_back(E); CHECK_FOR_ERROR } @@ -2131,7 +2131,7 @@ std::vector<const Type*> ParamTypeList; ParamAttrsList ParamAttrs; - if ($7 != NoAttributeSet) + if ($7 != ParamAttr::None) ParamAttrs.addAttributes(0, $7); if ($5) { // If there are arguments... unsigned index = 1; @@ -2141,7 +2141,7 @@ GEN_ERROR("Reference to abstract argument: " + Ty->getDescription()); ParamTypeList.push_back(Ty); if (Ty != Type::VoidTy) - if (I->Attrs != NoAttributeSet) + if (I->Attrs != ParamAttr::None) ParamAttrs.addAttributes(index, I->Attrs); } } @@ -2486,7 +2486,7 @@ // Pull out the types of all of the arguments... std::vector<const Type*> ParamTypes; ParamAttrsList ParamAttrs; - if ($8 != NoAttributeSet) + if ($8 != ParamAttr::None) ParamAttrs.addAttributes(0, $8); ValueRefList::iterator I = $6->begin(), E = $6->end(); unsigned index = 1; @@ -2495,7 +2495,7 @@ if (Ty == Type::VoidTy) GEN_ERROR("Short call syntax cannot be used with varargs"); ParamTypes.push_back(Ty); - if (I->Attrs != NoAttributeSet) + if (I->Attrs != ParamAttr::None) ParamAttrs.addAttributes(index, I->Attrs); } @@ -2792,7 +2792,7 @@ // Pull out the types of all of the arguments... std::vector<const Type*> ParamTypes; ParamAttrsList ParamAttrs; - if ($8 != NoAttributeSet) + if ($8 != ParamAttr::None) ParamAttrs.addAttributes(0, $8); unsigned index = 1; ValueRefList::iterator I = $6->begin(), E = $6->end(); @@ -2801,7 +2801,7 @@ if (Ty == Type::VoidTy) GEN_ERROR("Short call syntax cannot be used with varargs"); ParamTypes.push_back(Ty); - if (I->Attrs != NoAttributeSet) + if (I->Attrs != ParamAttr::None) ParamAttrs.addAttributes(index, I->Attrs); } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits