mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 00:17:01 +00:00
Don't initialize CV in terms of itself! Spotted by GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149833 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -721,14 +721,14 @@ void CppWriter::printConstant(const Constant *CV) {
|
|||||||
}
|
}
|
||||||
Out << "Constant* " << constName << " = ConstantStruct::get("
|
Out << "Constant* " << constName << " = ConstantStruct::get("
|
||||||
<< typeName << ", " << constName << "_fields);";
|
<< typeName << ", " << constName << "_fields);";
|
||||||
} else if (const ConstantVector *CV = dyn_cast<ConstantVector>(CV)) {
|
} else if (const ConstantVector *CVec = dyn_cast<ConstantVector>(CV)) {
|
||||||
Out << "std::vector<Constant*> " << constName << "_elems;";
|
Out << "std::vector<Constant*> " << constName << "_elems;";
|
||||||
nl(Out);
|
nl(Out);
|
||||||
unsigned N = CV->getNumOperands();
|
unsigned N = CVec->getNumOperands();
|
||||||
for (unsigned i = 0; i < N; ++i) {
|
for (unsigned i = 0; i < N; ++i) {
|
||||||
printConstant(CV->getOperand(i));
|
printConstant(CVec->getOperand(i));
|
||||||
Out << constName << "_elems.push_back("
|
Out << constName << "_elems.push_back("
|
||||||
<< getCppName(CV->getOperand(i)) << ");";
|
<< getCppName(CVec->getOperand(i)) << ");";
|
||||||
nl(Out);
|
nl(Out);
|
||||||
}
|
}
|
||||||
Out << "Constant* " << constName << " = ConstantVector::get("
|
Out << "Constant* " << constName << " = ConstantVector::get("
|
||||||
|
|||||||
Reference in New Issue
Block a user