diff options
author | Martin Liska <mliska@suse.cz> | 2014-06-27 11:24:45 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2014-06-27 09:24:45 +0000 |
commit | 807b7d6209c7bd54b4dfc9abdc17f451e71aa648 (patch) | |
tree | f1d34832a1df36dc5fc05332f91ff4a37dce3c77 /gcc/gimple.h | |
parent | fcbbf14a65cb7cb5814087870a0ecb47c227592c (diff) | |
download | gcc-807b7d6209c7bd54b4dfc9abdc17f451e71aa648.zip gcc-807b7d6209c7bd54b4dfc9abdc17f451e71aa648.tar.gz gcc-807b7d6209c7bd54b4dfc9abdc17f451e71aa648.tar.bz2 |
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.
From-SVN: r212067
Diffstat (limited to 'gcc/gimple.h')
-rw-r--r-- | gcc/gimple.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/gimple.h b/gcc/gimple.h index ceefbc0..3dfafc6 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 * |