[llvm] r191258 - Misc fixes for cpp backend.
Eli Friedman
eli.friedman at gmail.com
Mon Sep 23 17:54:16 PDT 2013
On Mon, Sep 23, 2013 at 5:42 PM, Rafael EspĂndola <
rafael.espindola at gmail.com> wrote:
> testcase?
>
We don't have any useful testing infrastructure for the cpp backend other
than checking it doesn't crash, so it's more effort than I'm willing to put
in at the moment...
-Eli
>
> On 23 September 2013 20:36, Eli Friedman <eli.friedman at gmail.com> wrote:
> > Author: efriedma
> > Date: Mon Sep 23 19:36:09 2013
> > New Revision: 191258
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=191258&view=rev
> > Log:
> > Misc fixes for cpp backend.
> >
> > PR17317.
> >
> > 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=191258&r1=191257&r2=191258&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp (original)
> > +++ llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp Mon Sep 23 19:36:09
> 2013
> > @@ -1161,8 +1161,7 @@ void CppWriter::printInstruction(const I
> > break;
> > }
> > case Instruction::Resume: {
> > - Out << "ResumeInst::Create(mod->getContext(), " << opNames[0]
> > - << ", " << bbname << ");";
> > + Out << "ResumeInst::Create(" << opNames[0] << ", " << bbname <<
> ");";
> > break;
> > }
> > case Instruction::Invoke: {
> > @@ -1176,7 +1175,7 @@ void CppWriter::printInstruction(const I
> > }
> > // FIXME: This shouldn't use magic numbers -3, -2, and -1.
> > Out << "InvokeInst *" << iName << " = InvokeInst::Create("
> > - << getOpName(inv->getCalledFunction()) << ", "
> > + << getOpName(inv->getCalledValue()) << ", "
> > << getOpName(inv->getNormalDest()) << ", "
> > << getOpName(inv->getUnwindDest()) << ", "
> > << iName << "_params, \"";
> > @@ -1590,6 +1589,20 @@ void CppWriter::printInstruction(const I
> > Out << "\");";
> > break;
> > }
> > + case Instruction::LandingPad: {
> > + const LandingPadInst *lpi = cast<LandingPadInst>(I);
> > + Out << "LandingPadInst* " << iName << " = LandingPadInst::Create(";
> > + printCppName(lpi->getType());
> > + Out << ", " << opNames[0] << ", " << lpi->getNumClauses() << ", \"";
> > + printEscapedString(lpi->getName());
> > + Out << "\", " << bbname << ");";
> > + nl(Out) << iName << "->setCleanup("
> > + << (lpi->isCleanup() ? "true" : "false")
> > + << ");";
> > + for (unsigned i = 0, e = lpi->getNumClauses(); i != e; ++i)
> > + nl(Out) << iName << "->addClause(" << opNames[i+1] << ");";
> > + break;
> > + }
> > }
> > DefinedValues.insert(I);
> > nl(Out);
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130923/1d0b11b9/attachment.html>
More information about the llvm-commits
mailing list