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?

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