summaryrefslogtreecommitdiff
path: root/gcc/function.h
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2007-11-16 00:11:47 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2007-11-16 00:11:47 +0000
commitc8a152f6bd7afcd8e84d8e6881e3d2ed434f8466 (patch)
tree672e864a197fe1e491117b7d173a827a5d262941 /gcc/function.h
parentd2aa980b20c8568f2275ff14be04b55709e16b82 (diff)
downloadgcc-c8a152f6bd7afcd8e84d8e6881e3d2ed434f8466.tar.gz
* tree-ssa-structalias.c (ipa_pta_execute): Rename 'cfun' to
'func'. * tree-parloops.c (create_loop_fn): Use set_cfun. * gengtype.c (open_base_files): Emit #undef cfun. * ipa-struct-reorg.c (do_reorg_1): Use set_cfun. * function.h (cfun): New define. * function.c: Undefine cfun. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130213 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.h')
-rw-r--r--gcc/function.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/function.h b/gcc/function.h
index 27bde1c3bd0..ff71c9ab516 100644
--- a/gcc/function.h
+++ b/gcc/function.h
@@ -466,6 +466,11 @@ struct function GTY(())
/* The function currently being compiled. */
extern GTY(()) struct function *cfun;
+/* In order to ensure that cfun is not set directly, we redefine it so
+ that it is not an lvalue. Rather than assign to cfun, use
+ push_cfun or set_cfun. */
+#define cfun (cfun + 0)
+
/* Pointer to chain of `struct function' for containing functions. */
extern GTY(()) struct function *outer_function_chain;