[Coverage] Delete some copy constructors (NFC)

llvm-svn: 284064
This commit is contained in:
Vedant Kumar 2016-10-12 22:27:49 +00:00
parent 10b98ae9de
commit d954f582bf
2 changed files with 12 additions and 1 deletions

View File

@ -290,6 +290,14 @@ struct FunctionRecord {
FunctionRecord(StringRef Name, ArrayRef<StringRef> Filenames)
: Name(Name), Filenames(Filenames.begin(), Filenames.end()) {}
FunctionRecord(FunctionRecord &&FR)
: Name(FR.Name), Filenames(std::move(FR.Filenames)),
CountedRegions(std::move(FR.CountedRegions)),
ExecutionCount(FR.ExecutionCount) {}
FunctionRecord(const FunctionRecord &) = delete;
const FunctionRecord &operator=(const FunctionRecord &) = delete;
void pushRegion(CounterMappingRegion Region, uint64_t Count) {
if (CountedRegions.empty())
ExecutionCount = Count;
@ -425,6 +433,9 @@ class CoverageMapping {
CoverageMapping() : MismatchedFunctionCount(0) {}
CoverageMapping(const CoverageMapping &) = delete;
const CoverageMapping &operator=(const CoverageMapping &) = delete;
/// \brief Add a function record corresponding to \p Record.
Error loadFunctionRecord(const CoverageMappingRecord &Record,
IndexedInstrProfReader &ProfileReader);

View File

@ -64,7 +64,7 @@ class CoverageExporterJson {
raw_ostream &OS;
/// \brief The full CoverageMapping object to export.
CoverageMapping Coverage;
const CoverageMapping &Coverage;
/// \brief States that the JSON rendering machine can be in.
enum JsonState { None, NonEmptyElement, EmptyElement };