forked from OSchip/llvm-project
Tblgen was generating syntactically illegal C++ code like:
SDOperand Tmp0,Tmp1,Tmp2,Tmp3,; GCC has a bug (24907) in which is fails to catch this, but VC++ correctly notes its illegality, so tblgen must be taught to only generate legal C++. llvm-svn: 25075
This commit is contained in:
parent
6b52be6a89
commit
7d17a6bc86
|
@ -2030,12 +2030,13 @@ public:
|
|||
std::string Fn = CP->getSelectFunc();
|
||||
NumRes = CP->getNumOperands();
|
||||
OS << " SDOperand ";
|
||||
for (unsigned i = 0; i != NumRes; ++i)
|
||||
unsigned i;
|
||||
for (i = 0; i < NumRes - 1; ++i)
|
||||
OS << "Tmp" << (i+ResNo) << ",";
|
||||
OS << ";\n";
|
||||
OS << "Tmp" << (i+ResNo) << ";\n";
|
||||
|
||||
OS << " if (!" << Fn << "(" << Val;
|
||||
for (unsigned i = 0; i < NumRes; i++)
|
||||
for (i = 0; i < NumRes; i++)
|
||||
OS << ", Tmp" << i + ResNo;
|
||||
OS << ")) goto P" << PatternNo << "Fail;\n";
|
||||
TmpNo = ResNo + NumRes;
|
||||
|
|
Loading…
Reference in New Issue