Hi, Patch attached:
The IsUnion function of Type wasn't ignoring the typedef as stated in the header. The codegen wasn't seeing an union didn't include the necessary bitcast. In passing, I also corrected the IsStruct function. -- Cédric Venet > -----Message d'origine----- > De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > De la part de Sanghyeon Seo > Envoyé : dimanche 2 décembre 2007 15:34 > À : [email protected] > Objet : [cfe-dev] Union oddity > > This crashes. I'm not sure what's going on... > > // RUN: clang -emit-llvm %s > > typedef union { int i; int *j; } value; > > int get_value(value v) { > return *v.j; > } > > -- > Seo Sanghyeon > _______________________________________________ > cfe-dev mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
IsUnionTypedef.patch
Description: Binary data
_______________________________________________ cfe-dev mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
