llvm.org GIT mirror llvm / 853066a
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 Duncan Sands 8 years ago
1 changed file(s) with 4 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
720720 }
721721 Out << "Constant* " << constName << " = ConstantStruct::get("
722722 << typeName << ", " << constName << "_fields);";
723 } else if (const ConstantVector *CV = dyn_cast(CV)) {
723 } else if (const ConstantVector *CVec = dyn_cast(CV)) {
724724 Out << "std::vector " << constName << "_elems;";
725725 nl(Out);
726 unsigned N = CV->getNumOperands();
726 unsigned N = CVec->getNumOperands();
727727 for (unsigned i = 0; i < N; ++i) {
728 printConstant(CV->getOperand(i));
728 printConstant(CVec->getOperand(i));
729729 Out << constName << "_elems.push_back("
730 << getCppName(CV->getOperand(i)) << ");";
730 << getCppName(CVec->getOperand(i)) << ");";
731731 nl(Out);
732732 }
733733 Out << "Constant* " << constName << " = ConstantVector::get("