[cfe-commits] r150976 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Eric Christopher echristo at apple.com
Mon Feb 20 20:32:12 PST 2012


Thank you very much!

-eric

On Feb 20, 2012, at 8:06 PM, Nico Weber wrote:

> Thanks! I added a test for this in r151027.
> 
> Nico
> 
> On Mon, Feb 20, 2012 at 10:05 AM, Eric Christopher <echristo at apple.com> wrote:
>> Author: echristo
>> Date: Mon Feb 20 12:05:04 2012
>> New Revision: 150976
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=150976&view=rev
>> Log:
>> Make forward declarations for objective-c types use the new
>> temporary forward declaration nodes. Fixes a problem building
>> Chrome.
>> 
>> Modified:
>>    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
>> 
>> Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=150976&r1=150975&r2=150976&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
>> +++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Mon Feb 20 12:05:04 2012
>> @@ -336,21 +336,19 @@
>>   case BuiltinType::Void:
>>     return llvm::DIType();
>>   case BuiltinType::ObjCClass:
>> -    return DBuilder.createStructType(TheCU, "objc_class",
>> -                                     getOrCreateMainFile(), 0, 0, 0,
>> -                                     llvm::DIDescriptor::FlagFwdDecl,
>> -                                     llvm::DIArray());
>> +    return DBuilder.createForwardDecl(llvm::dwarf::DW_TAG_structure_type,
>> +                                       "objc_class", getOrCreateMainFile(),
>> +                                       0);
>>   case BuiltinType::ObjCId: {
>>     // typedef struct objc_class *Class;
>>     // typedef struct objc_object {
>>     //  Class isa;
>>     // } *id;
>> 
>> -    llvm::DIType OCTy =
>> -      DBuilder.createStructType(TheCU, "objc_class",
>> -                                getOrCreateMainFile(), 0, 0, 0,
>> -                                llvm::DIDescriptor::FlagFwdDecl,
>> -                                llvm::DIArray());
>> +    llvm::DIType OCTy =
>> +      DBuilder.createForwardDecl(llvm::dwarf::DW_TAG_structure_type,
>> +                                  "objc_class", getOrCreateMainFile(),
>> +                                  0);
>>     unsigned Size = CGM.getContext().getTypeSize(CGM.getContext().VoidPtrTy);
>> 
>>     llvm::DIType ISATy = DBuilder.createPointerType(OCTy, Size);
>> @@ -368,10 +366,10 @@
>>                                      0, 0, 0, 0, Elements);
>>   }
>>   case BuiltinType::ObjCSel: {
>> -    return  DBuilder.createStructType(TheCU, "objc_selector",
>> -                                      getOrCreateMainFile(), 0, 0, 0,
>> -                                      llvm::DIDescriptor::FlagFwdDecl,
>> -                                      llvm::DIArray());
>> +    return
>> +      DBuilder.createForwardDecl(llvm::dwarf::DW_TAG_structure_type,
>> +                                  "objc_selector", getOrCreateMainFile(),
>> +                                  0);
>>   }
>>   case BuiltinType::UChar:
>>   case BuiltinType::Char_U: Encoding = llvm::dwarf::DW_ATE_unsigned_char; break;
>> @@ -1224,10 +1222,9 @@
>>   ObjCInterfaceDecl *Def = ID->getDefinition();
>>   if (!Def) {
>>     llvm::DIType FwdDecl =
>> -      DBuilder.createStructType(Unit, ID->getName(),
>> -                                DefUnit, Line, 0, 0,
>> -                                llvm::DIDescriptor::FlagFwdDecl,
>> -                                llvm::DIArray(), RuntimeLang);
>> +      DBuilder.createForwardDecl(llvm::dwarf::DW_TAG_structure_type,
>> +                                ID->getName(), DefUnit, Line,
>> +                                RuntimeLang);
>>     return FwdDecl;
>>   }
>>   ID = Def;
>> 
>> 
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list