[llvm-profdata] Add merge() to InstrProfRecord
authorNathan Slingerland <slingn@gmail.com>
Fri, 20 Nov 2015 19:12:43 +0000 (19:12 +0000)
committerNathan Slingerland <slingn@gmail.com>
Fri, 20 Nov 2015 19:12:43 +0000 (19:12 +0000)
commite0a7f28fc6380d15d0d3e2f04362250e47c445e3
tree5c76bdb60824101fa270db37f1fc8069328b6fdb
parentc9180bfb44d24e6c3251761548ebb2673741302e
[llvm-profdata] Add merge() to InstrProfRecord

Summary:
This change refactors two aspects of InstrProfRecord:

1) Add a merge() method to InstrProfRecord (previously InstrProfWriter combineInstrProfRecords()) in order to better encapsulate this functionality and to make the InstrProfRecord and SampleRecord APIs more consistent.

2) Make InstrProfRecord mergeValueProfData() a private method since it is only ever called internally by merge().

Reviewers: dnovillo, bogner, davidxl

Subscribers: silvas, vsk, llvm-commits

Differential Revision: http://reviews.llvm.org/D14786

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253695 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ProfileData/InstrProf.h
lib/ProfileData/InstrProfWriter.cpp