[llvm-dev] Why do we avoid pure virtual functions in compiler-rt?

Julian Lettner via llvm-dev llvm-dev at lists.llvm.org
Wed Jul 24 15:32:20 PDT 2019


Hi all,

I am just working on some code and noticed that we refrain from declaring any pure virtual functions in compiler-rt.
Our conceptually abstract classes are therefore not considered “abstract” in the C++ sense.
This turns some compile-time errors into run-time errors. Is there a reason we do this?

Example code:

class SymbolizerProcess {
  [...]
  virtual bool ReachedEndOfOutput(const char *buffer, uptr length) const {
    UNIMPLEMENTED();
  }
  [...]
}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190724/470da1ca/attachment.html>


More information about the llvm-dev mailing list