diff options
author | Duncan Sands <baldrick@free.fr> | 2012-02-05 14:16:09 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2012-02-05 14:16:09 +0000 |
commit | 853066a32af39c4674d47713e64b8ed9859976f9 (patch) | |
tree | 2794b7a2f6536736cedc443444e7fcc9d7f25b63 /lib/Target/CppBackend | |
parent | 408a25c583f3d3e7e9b6ef90a56ce435022591df (diff) | |
download | external_llvm-853066a32af39c4674d47713e64b8ed9859976f9.zip external_llvm-853066a32af39c4674d47713e64b8ed9859976f9.tar.gz external_llvm-853066a32af39c4674d47713e64b8ed9859976f9.tar.bz2 |
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
Diffstat (limited to 'lib/Target/CppBackend')
-rw-r--r-- | lib/Target/CppBackend/CPPBackend.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp index 64481b5..2cfae07 100644 --- a/lib/Target/CppBackend/CPPBackend.cpp +++ b/lib/Target/CppBackend/CPPBackend.cpp @@ -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(" |