[llvm-commits] [llvm] r149833 - /llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp
David Blaikie
dblaikie at gmail.com
Sun Feb 5 09:47:31 PST 2012
On Sun, Feb 5, 2012 at 6:16 AM, Duncan Sands <baldrick at free.fr> wrote:
> 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.
I know it's sometimes hard to do this, but: is there an obvious test
case that's missing here if this wasn't caught sooner?
- David
>
> 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("
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list