diff --git a/lib/ProfileData/CoverageMappingReader.cpp b/lib/ProfileData/CoverageMappingReader.cpp index d251e8dcb81..4137b1715c2 100644 --- a/lib/ProfileData/CoverageMappingReader.cpp +++ b/lib/ProfileData/CoverageMappingReader.cpp @@ -313,6 +313,7 @@ struct CovMapFuncRecordReader { // the module. virtual std::error_code readFunctionRecords(const char *&Buf, const char *End) = 0; + virtual ~CovMapFuncRecordReader() {} template static std::unique_ptr get(coverage::CoverageMappingVersion Version, InstrProfSymtab &P, @@ -340,6 +341,7 @@ public: std::vector &R, std::vector &F) : ProfileNames(P), Filenames(F), Records(R) {} + ~VersionedCovMapFuncRecordReader() override {} std::error_code readFunctionRecords(const char *&Buf, const char *End) override {