[llvm] r189272 - Dummy code to silence warning from 4189266
Bill Schmidt
wschmidt at linux.vnet.ibm.com
Mon Aug 26 14:01:49 PDT 2013
OK, thanks. If you don't mind, I'll clean that up when I put the call
logic in (and actually need two returns). Oops.
Thanks,
Bill
On Mon, 2013-08-26 at 13:42 -0700, David Blaikie wrote:
> On Mon, Aug 26, 2013 at 1:11 PM, Bill Schmidt
> <wschmidt at linux.vnet.ibm.com> wrote:
> > Author: wschmidt
> > Date: Mon Aug 26 15:11:46 2013
> > New Revision: 189272
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=189272&view=rev
> > Log:
> > Dummy code to silence warning from 4189266
> >
> > Modified:
> > llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp
> > llvm/trunk/lib/Target/PowerPC/PPCISelLowering.h
> >
> > Modified: llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp
> > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp?rev=189272&r1=189271&r2=189272&view=diff
> > ==============================================================================
> > --- llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp (original)
> > +++ llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp Mon Aug 26 15:11:46 2013
> > @@ -1810,6 +1810,15 @@ SDValue PPCTargetLowering::LowerVASTART(
> >
> > #include "PPCGenCallingConv.inc"
> >
> > +// Function whose sole purpose is to kill compiler warnings
> > +// stemming from unused functions included from PPCGenCallingConv.inc.
> > +CCAssignFn *PPCTargetLowering::useFastISelCCs(unsigned Flag) const {
> > + if (Flag == 1)
> > + return RetCC_PPC64_ELF_FIS; /* CC_PPC64_ELF_FIS in future patch. */
> > + else
>
> "else after return" is usually avoided in LLVM (I believe the style
> guide mentions this). Instead drop the "else" and write the trailing
> return directly/unindented.
>
> I'd even consider just using a conditional operator for this return.
>
> > + return RetCC_PPC64_ELF_FIS;
> > +}
> > +
> > bool llvm::CC_PPC32_SVR4_Custom_Dummy(unsigned &ValNo, MVT &ValVT, MVT &LocVT,
> > CCValAssign::LocInfo &LocInfo,
> > ISD::ArgFlagsTy &ArgFlags,
> >
> > Modified: llvm/trunk/lib/Target/PowerPC/PPCISelLowering.h
> > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelLowering.h?rev=189272&r1=189271&r2=189272&view=diff
> > ==============================================================================
> > --- llvm/trunk/lib/Target/PowerPC/PPCISelLowering.h (original)
> > +++ llvm/trunk/lib/Target/PowerPC/PPCISelLowering.h Mon Aug 26 15:11:46 2013
> > @@ -627,6 +627,8 @@ namespace llvm {
> >
> > SDValue DAGCombineFastRecip(SDValue Op, DAGCombinerInfo &DCI) const;
> > SDValue DAGCombineFastRecipFSQRT(SDValue Op, DAGCombinerInfo &DCI) const;
> > +
> > + CCAssignFn *useFastISelCCs(unsigned Flag) const;
> > };
> >
> > namespace PPC {
> >
> >
> > _______________________________________________
> > 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