[LLVMdev] why dummy asserting base/interface class virtual methods instead of pure virtual methods?

Jeff Kunkel jdkunk3 at gmail.com
Fri Jan 21 09:01:30 PST 2011


Software engineers like to work/test on one function at a time. So being
able to compile and test is an important factor when creating/writing code.
Thus, the functions are not pure-virtual. They fail at run time instead.

- Jeff

On Fri, Jan 21, 2011 at 2:11 AM, Heikki Kultala <hkultala at cs.tut.fi> wrote:

> LLVM code base seems to be full of base/interface classes, which have
> methods like
>
>   virtual SDValue
>     LowerCall(SDValue Chain, SDValue Callee,
>               CallingConv::ID CallConv, bool isVarArg, bool &isTailCall,
>               const SmallVectorImpl<ISD::OutputArg> &Outs,
>               const SmallVectorImpl<SDValue> &OutVals,
>               const SmallVectorImpl<ISD::InputArg> &Ins,
>               DebugLoc dl, SelectionDAG &DAG,
>               SmallVectorImpl<SDValue> &InVals) const {
>     assert(0 && "Not Implemented");
>     return SDValue();    // this is here to silence compiler errors
>   }
>
>
>
>
> Why are these not pure virtual methods?
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110121/a4448379/attachment.html>


More information about the llvm-dev mailing list