mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-16 05:01:56 +00:00
[PGO] Revert r350442 to fix commit message.
Will re-commit it using the correct commit message. llvm-svn: 350667
This commit is contained in:
parent
65317e1ca0
commit
d236b0aa93
@ -252,12 +252,11 @@ static StringRef stripDirPrefix(StringRef PathNameStr, uint32_t NumPrefix) {
|
||||
// data, its original linkage must be non-internal.
|
||||
std::string getPGOFuncName(const Function &F, bool InLTO, uint64_t Version) {
|
||||
if (!InLTO) {
|
||||
StringRef FileName(F.getParent()->getSourceFileName());
|
||||
uint32_t StripLevel = StaticFuncFullModulePrefix ? 0 : (uint32_t)-1;
|
||||
if (StripLevel < StaticFuncStripDirNamePrefix)
|
||||
StripLevel = StaticFuncStripDirNamePrefix;
|
||||
if (StripLevel)
|
||||
FileName = stripDirPrefix(FileName, StripLevel);
|
||||
StringRef FileName = (StaticFuncFullModulePrefix
|
||||
? F.getParent()->getName()
|
||||
: sys::path::filename(F.getParent()->getName()));
|
||||
if (StaticFuncFullModulePrefix && StaticFuncStripDirNamePrefix != 0)
|
||||
FileName = stripDirPrefix(FileName, StaticFuncStripDirNamePrefix);
|
||||
return getPGOFuncName(F.getName(), F.getLinkage(), FileName, Version);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user