[cfe-commits] r98021 - in /cfe/trunk/lib/CodeGen: CGDebugInfo.cpp CGDebugInfo.h

Devang Patel dpatel at apple.com
Fri Mar 12 11:23:27 PST 2010


On Mar 12, 2010, at 11:18 AM, Benjamin Kramer wrote:

> 
> On 09.03.2010, at 01:44, Devang Patel wrote:
> 
>> Author: dpatel
>> Date: Mon Mar  8 18:44:50 2010
>> New Revision: 98021
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=98021&view=rev
>> Log:
>> Start using DIFile. Corresponding llvm patch is r98020.
>> 
>> Modified:
>>   cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
>>   cfe/trunk/lib/CodeGen/CGDebugInfo.h
>> 
>> Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=98021&r1=98020&r2=98021&view=diff
> […]
>> +/// CreateCompileUnit - Create new compile unit.
>> +void CGDebugInfo::CreateCompileUnit() {
>> 
>>  // Get absolute path name.
>> -  llvm::sys::Path AbsFileName(FileName);
>> +  llvm::sys::Path AbsFileName(CGM.getCodeGenOpts().MainFileName);
>>  AbsFileName.makeAbsolute();
> 
> Hi Devang,
> 
> I investigated the MSVC test failures and the culprit seems to be an empty MainFileName.
> Our win32 implementation of makeAbsolute crashes if the path is empty.

Aha... 
makeAbsolute should not crash. Meanwhile, would it be possible for you to try a simple patch to use "<unknown>" is main file name if MainFileName is empty ?
Thanks for tracking this!
-
Devang



More information about the cfe-commits mailing list