mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +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:
parent
408a25c583
commit
853066a32a
@ -721,14 +721,14 @@ void CppWriter::printConstant(const Constant *CV) {
|
||||
}
|
||||
Out << "Constant* " << constName << " = ConstantStruct::get("
|
||||
<< 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;";
|
||||
nl(Out);
|
||||
unsigned N = CV->getNumOperands();
|
||||
unsigned N = CVec->getNumOperands();
|
||||
for (unsigned i = 0; i < N; ++i) {
|
||||
printConstant(CV->getOperand(i));
|
||||
printConstant(CVec->getOperand(i));
|
||||
Out << constName << "_elems.push_back("
|
||||
<< getCppName(CV->getOperand(i)) << ");";
|
||||
<< getCppName(CVec->getOperand(i)) << ");";
|
||||
nl(Out);
|
||||
}
|
||||
Out << "Constant* " << constName << " = ConstantVector::get("
|
||||
|
Loading…
Reference in New Issue
Block a user