aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple.h
diff options
context:
space:
mode:
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-27 09:24:45 +0000
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-27 09:24:45 +0000
commit4c8041d7f70d0d301fecb802578cf441c043ece6 (patch)
treef1d34832a1df36dc5fc05332f91ff4a37dce3c77 /gcc/gimple.h
parentec00a242b6889a0bb4949f26c5e2a63b50f13315 (diff)
Fix for devirtualization dump functions
* gimple.h (gimple_location_safe): New function introduced. * cgraphunit.c (walk_polymorphic_call_targets): Usage of gimple_location_safe replaces gimple_location. (gimple_fold_call): Likewise. * ipa-devirt.c (ipa_devirt): Likewise. * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise. * ipa.c (walk_polymorphic_call_targets): Likewise. * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212067 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple.h')
-rw-r--r--gcc/gimple.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/gimple.h b/gcc/gimple.h
index ceefbc0890f..3dfafc6d7c1 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -1501,6 +1501,15 @@ gimple_location (const_gimple g)
return g->location;
}
+/* Return location information for statement G if g is not NULL.
+ Otherwise, UNKNOWN_LOCATION is returned. */
+
+static inline location_t
+gimple_location_safe (const_gimple g)
+{
+ return g ? gimple_location (g) : UNKNOWN_LOCATION;
+}
+
/* Return pointer to location information for statement G. */
static inline const location_t *