[clang] [Clang][InstrProf] Allow absolute path in fun.list of -fprofile-list= (PR #67519)
Shivam Gupta via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 8 22:13:55 PST 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);
----------------
xgupta wrote:
I updated the position of that piece of code.
I could not think properly the test case, added one version which was failing previously but passing now with the changes in the source file.
I think the issue with the previous version that that was not working when we were mixing the relative and completed paths in q single command line invocation.
https://github.com/llvm/llvm-project/pull/67519
More information about the cfe-commits
mailing list