Heikki Kultala
2011-Jan-21 07:11 UTC
[LLVMdev] why dummy asserting base/interface class virtual methods instead of pure virtual methods?
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?
Jeff Kunkel
2011-Jan-21 17:01 UTC
[LLVMdev] why dummy asserting base/interface class virtual methods instead of pure virtual methods?
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>
Maybe Matching Threads
- [LLVMdev] Changes to TargetLowering::{LowerCallTo,LowerCall}
- [LLVMdev] mblaze backend: unreachable executed
- [LLVMdev] mblaze backend: unreachable executed
- [LLVMdev] mblaze backend: unreachable executed
- [LLVMdev] [cfe-commits] Fix handling of ARM homogenous aggregates