By default, the path style is decided by the host. This patch makes JMC
uses the path style used by the SP directory. This makes JMC output
host-independent.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
lgtm, thanks!
llvm/lib/CodeGen/JMCInstrumenter.cpp | ||
---|---|---|
72 | I see, I was hoping we already had an auto-detector routine. We have an existing one in the VFS code, but it's inaccessible from here, and your logic seems slightly better: | |
llvm/test/Instrumentation/JustMyCode/jmc-instrument.ll | ||
147 | Thanks for the tests |
llvm/lib/CodeGen/JMCInstrumenter.cpp | ||
---|---|---|
72 | yeah, I considered hoisting it to Path.h but it does not seem suitable for all cases for JMC and I'm afraid of breaking lldb by touching path related code. We should definitely consider a common path style detection function if there are more users in the future. |
I see, I was hoping we already had an auto-detector routine. We have an existing one in the VFS code, but it's inaccessible from here, and your logic seems slightly better:
https://github.com/llvm/llvm-project/blob/main/llvm/lib/Support/VirtualFileSystem.cpp#L1059