[llvm-commits] [llvm] r149833 - /llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp
Duncan Sands
baldrick at free.fr
Sun Feb 5 06:16:10 PST 2012
Author: baldrick
Date: Sun Feb 5 08:16:09 2012
New Revision: 149833
URL: http://llvm.org/viewvc/llvm-project?rev=149833&view=rev
Log:
Don't initialize CV in terms of itself! Spotted by GCC.
Modified:
llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp
Modified: llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp?rev=149833&r1=149832&r2=149833&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp (original)
+++ llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp Sun Feb 5 08:16:09 2012
@@ -721,14 +721,14 @@
}
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("
More information about the llvm-commits
mailing list