* [tuples] Add support for mapped locations in gimple_locus_empty_p
@ 2007-10-30 5:10 Diego Novillo
0 siblings, 0 replies; only message in thread
From: Diego Novillo @ 2007-10-30 5:10 UTC (permalink / raw)
To: gcc-patches
Thanks to Tom for providing the code and checking the other functions
dealing with locus_t.
Tested on x86_64. Committed.
Diego.
2007-10-29 Diego Novillo <dnovillo@google.com>
Tom Tromey <tromey@redhat.com>
* gimple.h (gimple_locus): Update comment.
(gimple_set_locus): Likewise.
(gimple_locus_empty_p): Add support for mapped locations.
Index: gimple.h
===================================================================
--- gimple.h (revision 129739)
+++ gimple.h (working copy)
@@ -543,8 +543,7 @@ gimple_set_block (gimple g, tree block)
}
-/* Return locus information for statement G. FIXME tuples, fix for
- mapped location support. */
+/* Return locus information for statement G. */
static inline location_t
gimple_locus (const_gimple g)
@@ -553,8 +552,7 @@ gimple_locus (const_gimple g)
}
-/* Set locus information for statement G. FIXME tuples, fix for
- mapped location support. */
+/* Set locus information for statement G. */
static inline void
gimple_set_locus (gimple g, location_t locus)
@@ -568,7 +566,11 @@ gimple_set_locus (gimple g, location_t l
static inline bool
gimple_locus_empty_p (const_gimple g)
{
+#ifdef USE_MAPPED_LOCATION
+ return gimple_locus (g) == UNKNOWN_LOCATION;
+#else
return gimple_locus (g).file == NULL && gimple_locus (g).line == 0;
+#endif
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-10-30 1:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-30 5:10 [tuples] Add support for mapped locations in gimple_locus_empty_p Diego Novillo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).