[llvm-commits] [PATCH] Win32's Hybrid path separator in argv[0] should be accepted to bugpoint
Chris Lattner
clattner at apple.com
Mon Aug 23 12:57:51 PDT 2010
On Aug 23, 2010, at 7:37 AM, NAKAMURA Takumi wrote:
> Hello guys,
>
> I saw argv[0], as below, with mingw-configured Python/w32 lit.
>
> "c:/path/to/build/Release+Asserts/bin\bugpoint.exe"
>
> Bugpoint assumes path separator consists only with '/'
> to extract directory as "c:/path/to/build/Release+Asserts". (w/o "bin")
>
> My patch, attached, canonicalize BugDriver::ToolName(==argv[0])
> with llvm::sys::Path.
> confirmed on cygwin and ppc-f12.
>
> Please take a look into my patch, thank you.
This patch looks functionally fine, but I'd prefer if you could change OptimizerDriver.cpp to use sys::path locally, instead of changing the BugDriver class to contain a sys::Path. This will reduce the amount of change, and will make it easier when we eventually eliminate sys::Path in the future.
-Chris
More information about the llvm-commits
mailing list