Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions llvm/lib/ProfileData/InstrProfReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,8 @@ readBinaryIdsInternal(const MemoryBuffer &DataBuffer,
return Error::success();
}

static void
printBinaryIdsInternal(raw_ostream &OS,
const std::vector<llvm::object::BuildID> &BinaryIds) {
static void printBinaryIdsInternal(raw_ostream &OS,
ArrayRef<llvm::object::BuildID> BinaryIds) {
OS << "Binary IDs: \n";
for (const auto &BI : BinaryIds) {
for (auto I : BI)
Expand Down Expand Up @@ -1502,7 +1501,7 @@ Expected<InstrProfRecord> IndexedInstrProfReader::getInstrProfRecord(
// A flag to indicate if the records are from the same type
// of profile (i.e cs vs nocs).
bool CSBitMatch = false;
auto getFuncSum = [](const std::vector<uint64_t> &Counts) {
auto getFuncSum = [](ArrayRef<uint64_t> Counts) {
uint64_t ValueSum = 0;
for (uint64_t CountValue : Counts) {
if (CountValue == (uint64_t)-1)
Expand Down
3 changes: 1 addition & 2 deletions llvm/lib/ProfileData/SampleProfWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -811,8 +811,7 @@ std::error_code SampleProfileWriterBinary::writeSummary() {
encodeULEB128(Summary->getMaxFunctionCount(), OS);
encodeULEB128(Summary->getNumCounts(), OS);
encodeULEB128(Summary->getNumFunctions(), OS);
const std::vector<ProfileSummaryEntry> &Entries =
Summary->getDetailedSummary();
ArrayRef<ProfileSummaryEntry> Entries = Summary->getDetailedSummary();
encodeULEB128(Entries.size(), OS);
for (auto Entry : Entries) {
encodeULEB128(Entry.Cutoff, OS);
Expand Down