[clang] [Clang][InstrProf] Allow absolute path in fun.list of -fprofile-list= (PR #67519)
Ellis Hoag via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 19 10:08:34 PDT 2023
================
@@ -139,9 +139,23 @@ std::optional<ProfileList::ExclusionType>
ProfileList::isFileExcluded(StringRef FileName,
CodeGenOptions::ProfileInstrKind Kind) const {
StringRef Section = getSectionName(Kind);
- // Check for "source:<regex>=<case>"
+
+ // Convert the input file path to its canonical (absolute) form
+ llvm::SmallString<128> CanonicalFileName(FileName);
+ llvm::sys::fs::make_absolute(CanonicalFileName);
----------------
ellishg wrote:
I consider `src`/`!src` to be a deprecated format and users would probably only use one of the two formats. So I think either case is fine, but this change seems to make more sense to me.
https://clang.llvm.org/docs/UsersManual.html#older-prefixes
https://github.com/llvm/llvm-project/pull/67519
More information about the cfe-commits
mailing list