[llvm-commits] [llvm-gcc-4.2] r62865 - /llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp

Devang Patel dpatel at apple.com
Fri Jan 23 12:47:20 PST 2009


Fixed.
On Jan 23, 2009, at 12:36 PM, Bill Wendling wrote:

> Devang,
>
> This is giving us this weird error message during a bootstrap:
>
> cc1plus: warnings being treated as errors
> /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/ 
> llvmgcc42~obj/src/gcc/llvm-debug.cpp:
> In member function 'llvm::DIType
> llvm::DebugInfo::createEnumType(tree_node*)':
> /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/ 
> llvmgcc42~obj/src/gcc/llvm-debug.cpp:499:
> warning: 'Loc$line' may be used uninitialized in this function
> make[4]: *** [llvm-debug.o] Error 1
>
> -bw
>
> On Fri, Jan 23, 2009 at 11:31 AM, Devang Patel <dpatel at apple.com>  
> wrote:
>> Author: dpatel
>> Date: Fri Jan 23 13:31:32 2009
>> New Revision: 62865
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=62865&view=rev
>> Log:
>> Incomplete enum does not have any location info available.
>>
>> Modified:
>>   llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
>>
>> Modified: llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp?rev=62865&r1=62864&r2=62865&view=diff
>>
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> =====================================================================
>> --- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original)
>> +++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Fri Jan 23 13:31:32 2009
>> @@ -496,9 +496,13 @@
>>  llvm::DIArray EltArray =
>>    DebugFactory.GetOrCreateArray(&Elements[0], Elements.size());
>>
>> -  expanded_location Loc = GetNodeLocation(TREE_CHAIN(type), false);
>> +  expanded_location Loc;
>>  std::string Filename, Directory;
>> -  DirectoryAndFile(Loc.file, Directory, Filename);
>> +  if (TYPE_SIZE(type)) {
>> +    // Incomplete enums do not  have any location info.
>> +    Loc = GetNodeLocation(TREE_CHAIN(type), false);
>> +    DirectoryAndFile(Loc.file, Directory, Filename);
>> +  }
>>  return  
>> DebugFactory 
>> .CreateCompositeType(llvm::dwarf::DW_TAG_enumeration_type,
>>                                          MainCompileUnit,  
>> GetNodeName(type),
>>                                          MainCompileUnit, Loc.line,
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-
Devang






More information about the llvm-commits mailing list