-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
The DebugLoc for a optimization record is created from several sources:
- the path from the root of the build to this record's associated source file
- This is effectively controlled by the project's makefiles and how they invoke their build system.
- the location of an
#included file- This depends on how the source file invokes
#includeand how the include directories are specified by the makefiles.
- This depends on how the source file invokes
Both of these may include . and .. in their paths.
Working with a few projects, I've noticed a couple of minor issues due to symlinks in DebugLocs:
- If a remark exists with a
DebugLoc.Filethat begins with., the HTML file name will still contain the.at the beginning. On Unix-like systems, this hides the HTML file from typical file explorers.- Example:
./common/foo.h==>._common_foo.h.html.
- Example:
- If source files in multiple directories include the same header using relative paths, one HTML file will be created for each directory.
- Example:
./dir1/foo.cand./dir2/bar.cboth contain#include <../lib/baz.h>. Two HTML files will be created:._dir1_.._lib_baz.h.htmland._dir2_.._lib_baz.h.html.
- Example:
I think both of these could be resolved by transforming the DebugLoc.File into an absolute path w.r.t the source_dir, but I'm not sure exactly where to do so. It seems like the code partially supports dumping remarks back into YAML, and it's likely that resolving these paths would remove compatibility (since dumping back to YAML would produce absolute paths).
Metadata
Metadata
Assignees
Labels
No labels