Add tracking for extension based warnings
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 7 Apr 2010 23:53:54 +0000 (16:53 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 7 Apr 2010 23:53:54 +0000 (16:53 -0700)
Using '#extension foo: warn' instructs the compiler to generate a
warning when some feature of the extension 'foo' is used.  This patch
adds some infrastructure needed to support that for variables.

Similar changes will be needed for types and built-in functions.

ir.h

diff --git a/ir.h b/ir.h
index fee23b2..13d0715 100644 (file)
--- a/ir.h
+++ b/ir.h
@@ -157,6 +157,11 @@ public:
    unsigned array_lvalue:1;
 
    /**
+    * Emit a warning if this variable is accessed.
+    */
+   const char *warn_extension;
+
+   /**
     * Value assigned in the initializer of a variable declared "const"
     */
    ir_constant *constant_value;