Skip to content

Commit cd164c2

Browse files
committed
return early if FuncsToUse is empty
1 parent 15df878 commit cd164c2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/ProfileData/SampleProfReader.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,9 @@ bool SampleProfileReaderExtBinaryBase::useFuncOffsetList() const {
826826
std::error_code
827827
SampleProfileReaderExtBinaryBase::read(const DenseSet<StringRef> &FuncsToUse,
828828
SampleProfileMap &Profiles) {
829+
if (FuncsToUse.empty())
830+
return sampleprof_error::success;
831+
829832
Data = ProfileSecRange.first;
830833
End = ProfileSecRange.second;
831834
if (std::error_code EC = readFuncProfiles(FuncsToUse, Profiles))

0 commit comments

Comments
 (0)