[llvm-commits] [PATCH] Win32's Hybrid path separator in argv[0] should be accepted to bugpoint

Chris Lattner clattner at apple.com
Tue Aug 24 10:44:51 PDT 2010


Looks great, applied in r111929, thanks!

-Chris

On Aug 24, 2010, at 2:56 AM, NAKAMURA Takumi wrote:

> Hello, Chris,
> 
> Okay, I made a simplified patch, referred to ToolRunner.cpp,
> confirmed on cygwin, mingw and ppc-f12.
> 
> I am worried whether 3rd parameter of llvm::FindExecutable() would be
> valid or not.
> I don't have any environments 3rd parameter is effective on.
> 
> I will wait for sys::Path 2.0 XD
> 
> thank you, ... Takumi
> 
> 
> 2010/8/24 Chris Lattner <clattner at apple.com>:
>> 
>> 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
> <r110555-bugpoint-invoking-opt.diff.txt>





More information about the llvm-commits mailing list