Author: matze Date: Mon Dec 5 00:00:51 2016 New Revision: 288645 URL: http://llvm.org/viewvc/llvm-project?rev=288645&view=rev Log: Adapt to llvm/TableGen DagInit changes.
Modified: cfe/trunk/utils/TableGen/NeonEmitter.cpp Modified: cfe/trunk/utils/TableGen/NeonEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/NeonEmitter.cpp?rev=288645&r1=288644&r2=288645&view=diff ============================================================================== --- cfe/trunk/utils/TableGen/NeonEmitter.cpp (original) +++ cfe/trunk/utils/TableGen/NeonEmitter.cpp Mon Dec 5 00:00:51 2016 @@ -1478,14 +1478,14 @@ std::pair<Type, std::string> Intrinsic:: if (DI->getNumArgs() == 2) { // Unary op. std::pair<Type, std::string> R = - emitDagArg(DI->getArg(1), DI->getArgName(1)); + emitDagArg(DI->getArg(1), DI->getArgNameStr(1)); return std::make_pair(R.first, Op + R.second); } else { assert(DI->getNumArgs() == 3 && "Can only handle unary and binary ops!"); std::pair<Type, std::string> R1 = - emitDagArg(DI->getArg(1), DI->getArgName(1)); + emitDagArg(DI->getArg(1), DI->getArgNameStr(1)); std::pair<Type, std::string> R2 = - emitDagArg(DI->getArg(2), DI->getArgName(2)); + emitDagArg(DI->getArg(2), DI->getArgNameStr(2)); assert_with_loc(R1.first == R2.first, "Argument type mismatch!"); return std::make_pair(R1.first, R1.second + " " + Op + " " + R2.second); } @@ -1496,7 +1496,7 @@ std::pair<Type, std::string> Intrinsic:: std::vector<std::string> Values; for (unsigned I = 0; I < DI->getNumArgs() - 1; ++I) { std::pair<Type, std::string> R = - emitDagArg(DI->getArg(I + 1), DI->getArgName(I + 1)); + emitDagArg(DI->getArg(I + 1), DI->getArgNameStr(I + 1)); Types.push_back(R.first); Values.push_back(R.second); } @@ -1529,7 +1529,8 @@ std::pair<Type, std::string> Intrinsic:: bool IsBitCast){ // (cast MOD* VAL) -> cast VAL to type given by MOD. std::pair<Type, std::string> R = emitDagArg( - DI->getArg(DI->getNumArgs() - 1), DI->getArgName(DI->getNumArgs() - 1)); + DI->getArg(DI->getNumArgs() - 1), + DI->getArgNameStr(DI->getNumArgs() - 1)); Type castToType = R.first; for (unsigned ArgIdx = 0; ArgIdx < DI->getNumArgs() - 1; ++ArgIdx) { @@ -1540,11 +1541,11 @@ std::pair<Type, std::string> Intrinsic:: // 4. The value "U" or "S" to switch the signedness. // 5. The value "H" or "D" to half or double the bitwidth. // 6. The value "8" to convert to 8-bit (signed) integer lanes. - if (!DI->getArgName(ArgIdx).empty()) { - assert_with_loc(Intr.Variables.find(DI->getArgName(ArgIdx)) != + if (!DI->getArgNameStr(ArgIdx).empty()) { + assert_with_loc(Intr.Variables.find(DI->getArgNameStr(ArgIdx)) != Intr.Variables.end(), "Variable not found"); - castToType = Intr.Variables[DI->getArgName(ArgIdx)].getType(); + castToType = Intr.Variables[DI->getArgNameStr(ArgIdx)].getType(); } else { StringInit *SI = dyn_cast<StringInit>(DI->getArg(ArgIdx)); assert_with_loc(SI, "Expected string type or $Name for cast type"); @@ -1659,9 +1660,9 @@ std::pair<Type, std::string> Intrinsic:: // (shuffle arg1, arg2, sequence) std::pair<Type, std::string> Arg1 = - emitDagArg(DI->getArg(0), DI->getArgName(0)); + emitDagArg(DI->getArg(0), DI->getArgNameStr(0)); std::pair<Type, std::string> Arg2 = - emitDagArg(DI->getArg(1), DI->getArgName(1)); + emitDagArg(DI->getArg(1), DI->getArgNameStr(1)); assert_with_loc(Arg1.first == Arg2.first, "Different types in arguments to shuffle!"); @@ -1703,7 +1704,8 @@ std::pair<Type, std::string> Intrinsic:: std::pair<Type, std::string> Intrinsic::DagEmitter::emitDagDup(DagInit *DI) { assert_with_loc(DI->getNumArgs() == 1, "dup() expects one argument"); - std::pair<Type, std::string> A = emitDagArg(DI->getArg(0), DI->getArgName(0)); + std::pair<Type, std::string> A = emitDagArg(DI->getArg(0), + DI->getArgNameStr(0)); assert_with_loc(A.first.isScalar(), "dup() expects a scalar argument"); Type T = Intr.getBaseType(); @@ -1721,8 +1723,10 @@ std::pair<Type, std::string> Intrinsic:: std::pair<Type, std::string> Intrinsic::DagEmitter::emitDagSplat(DagInit *DI) { assert_with_loc(DI->getNumArgs() == 2, "splat() expects two arguments"); - std::pair<Type, std::string> A = emitDagArg(DI->getArg(0), DI->getArgName(0)); - std::pair<Type, std::string> B = emitDagArg(DI->getArg(1), DI->getArgName(1)); + std::pair<Type, std::string> A = emitDagArg(DI->getArg(0), + DI->getArgNameStr(0)); + std::pair<Type, std::string> B = emitDagArg(DI->getArg(1), + DI->getArgNameStr(1)); assert_with_loc(B.first.isScalar(), "splat() requires a scalar int as the second argument"); @@ -1738,12 +1742,13 @@ std::pair<Type, std::string> Intrinsic:: std::pair<Type, std::string> Intrinsic::DagEmitter::emitDagSaveTemp(DagInit *DI) { assert_with_loc(DI->getNumArgs() == 2, "save_temp() expects two arguments"); - std::pair<Type, std::string> A = emitDagArg(DI->getArg(1), DI->getArgName(1)); + std::pair<Type, std::string> A = emitDagArg(DI->getArg(1), + DI->getArgNameStr(1)); assert_with_loc(!A.first.isVoid(), "Argument to save_temp() must have non-void type!"); - std::string N = DI->getArgName(0); + std::string N = DI->getArgNameStr(0); assert_with_loc(!N.empty(), "save_temp() expects a name as the first argument"); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits