[llvm-commits] [llvm-gcc-4.2] r60908 - in /llvm-gcc-4.2/trunk/gcc: llvm-backend.cpp llvm-convert.cpp llvm-debug.cpp llvm-debug.h llvm-linker-hack.cpp
Devang Patel
dpatel at apple.com
Thu Dec 18 11:19:39 PST 2008
On Dec 11, 2008, at 7:10 PM, Evan Cheng wrote:
> Awesome! Is it all done now?
>
> On Dec 11, 2008, at 3:22 PM, Devang Patel wrote:
>
>> // Check to see if the compile unit already has created this type.
>> - TypeDesc *Slot = TypeCache[type];
>> - if (Slot && !(Slot->isForwardDecl() && TYPE_SIZE(type) != 0))
>> - // FIXME: If previously created type is just a forward
>> declaration, emit
>> - // a new descriptor for the type definition. The correct fix is
>> to *fix*
>> - // up the llvm ir (since MMI may have already been converted to
>> llvm). But
>> - // that's correctly not doable. We'll fix this when we convert
>> to the new
>> - // API in DebugInfo.h
>> + DIType &Slot = TypeCache[type];
>> + if (!Slot.isNull())
>> return Slot;
>
> How do you solve this? It's a type that was previously a forward
> declaration but it's now defined:
This patch set the stage to modify the llvm ir. The next patch,
r61207, detects forward declaration and does the right thing.
-
Devang
>
>
> struct ST;
>
> void foo(struct ST *x) {
> }
>
> struct ST {
> int a;
> };
>
> typedef struct ST STtype;
> STtype X;
>
> void bar() {
> X.a = 1;
> }
>
> Evan
> _______________________________________________
> 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