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 fee23b2582980225a61fb74548290c13d351d999..13d07155a42fd2120f1de70915cf0c7bb6cf5410 100644 (file)
--- a/ir.h
+++ b/ir.h
@@ -156,6 +156,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"
     */