Skip to content

Commit 2978e21

Browse files
committed
promote eligible entry point functions
1 parent 1344cdd commit 2978e21

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/tools/llvm-profgen/ProfiledBinary.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,9 @@ void ProfiledBinary::setIsFuncEntry(FuncRange *FuncRange,
539539
// Set IsFuncEntry to ture if there is only one range in the function or the
540540
// RangeSymName from ELF is equal to its DWARF-based function name.
541541
if (FuncRange->Func->Ranges.size() == 1 ||
542-
(!FuncRange->IsFuncEntry && FuncRange->getFuncName() == RangeSymName))
542+
(!FuncRange->IsFuncEntry &&
543+
(FuncRange->getFuncName() == RangeSymName ||
544+
FuncRange->Func->NameStatus != DwarfNameStatus::Matched)))
543545
FuncRange->IsFuncEntry = true;
544546
}
545547

0 commit comments

Comments
 (0)