Add DECL_SOURCE_COLUMN.
authorRüdiger Sonderfeld <ruediger@c-plusplus.de>
Wed, 20 Jun 2012 18:03:10 +0000 (18:03 +0000)
committerDiego Novillo <dnovillo@gcc.gnu.org>
Wed, 20 Jun 2012 18:03:10 +0000 (14:03 -0400)
I'm currently writing a plugin for GCC and I need to extract the
column of a declaration. There exists DECL_SOURCE_FILE/LINE already
and for consistency reasons and ease of use I've added a
DECL_SOURCE_COLUMN macro.

2012-06-20  Rüdiger Sonderfeld  <ruediger@c-plusplus.de>

* tree.h (DECL_SOURCE_COLUMN): New accessor

From-SVN: r188841

gcc/ChangeLog
gcc/tree.h

index 4e4dfe5..50bf328 100644 (file)
@@ -1,3 +1,7 @@
+2012-06-20  Rüdiger Sonderfeld  <ruediger@c-plusplus.de>
+
+       * tree.h (DECL_SOURCE_COLUMN): New accessor.
+
 2012-06-20  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.md (<rounding_insn><mode>2): Macroize expander
index 1539bec..8bd0580 100644 (file)
@@ -2670,6 +2670,7 @@ struct function;
   (DECL_MINIMAL_CHECK (NODE)->decl_minimal.locus)
 #define DECL_SOURCE_FILE(NODE) LOCATION_FILE (DECL_SOURCE_LOCATION (NODE))
 #define DECL_SOURCE_LINE(NODE) LOCATION_LINE (DECL_SOURCE_LOCATION (NODE))
+#define DECL_SOURCE_COLUMN(NODE) LOCATION_COLUMN (DECL_SOURCE_LOCATION (NODE))
 #define DECL_IS_BUILTIN(DECL) \
   (DECL_SOURCE_LOCATION (DECL) <= BUILTINS_LOCATION)