Author: baldrick Date: Sun Jul 15 06:55:54 2007 New Revision: 39869 URL: http://llvm.org/viewvc/llvm-project?rev=39869&view=rev Log: Check correctness of using decl_with_rtl in LLVM constructs.
Modified: llvm-gcc-4-2/trunk/gcc/tree.h Modified: llvm-gcc-4-2/trunk/gcc/tree.h URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4-2/trunk/gcc/tree.h?rev=39869&r1=39868&r2=39869&view=diff ============================================================================== --- llvm-gcc-4-2/trunk/gcc/tree.h (original) +++ llvm-gcc-4-2/trunk/gcc/tree.h Sun Jul 15 06:55:54 2007 @@ -2831,8 +2831,9 @@ #endif #define SET_DECL_LLVM(NODE, LLVM) (llvm_set_decl (NODE,LLVM)) -#define SET_DECL_LLVM_INDEX(NODE, INDEX) ((NODE)->decl_with_rtl.llvm = INDEX) -#define GET_DECL_LLVM_INDEX(NODE) ((NODE)->decl_with_rtl.llvm) +#define SET_DECL_LLVM_INDEX(NODE, INDEX) \ + (DECL_WRTL_CHECK(NODE)->decl_with_rtl.llvm = INDEX) +#define GET_DECL_LLVM_INDEX(NODE) (DECL_WRTL_CHECK(NODE)->decl_with_rtl.llvm) /* Returns nonzero if the DECL_LLVM for NODE has already been set. */ extern bool llvm_set_decl_p(tree); @@ -2840,7 +2841,8 @@ /* Copy the LLVM from NODE1 to NODE2. If the LLVM was not set for NODE1, it will not be set for NODE2; this is a lazy copy. */ #define COPY_DECL_LLVM(NODE1, NODE2) \ - ((NODE2)->decl_with_rtl.llvm = (NODE1)->decl_with_rtl.llvm) + (DECL_WRTL_CHECK(NODE2)->decl_with_rtl.llvm = \ + DECL_WRTL_CHECK(NODE1)->decl_with_rtl.llvm) /* The DECL_LLVM for NODE, if it is set, or NULL, if it is not set. */ #define DECL_LLVM_IF_SET(NODE) \ (DECL_LLVM_SET_P (NODE) ? DECL_LLVM (NODE) : NULL) _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits