Add ir_function_signature::function_name
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 31 Mar 2010 23:44:12 +0000 (16:44 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 31 Mar 2010 23:44:12 +0000 (16:44 -0700)
ir.h

diff --git a/ir.h b/ir.h
index 261d1924027ffac1d469de92231a3893e3554a63..c3c5369bfc0bb3bc51e4456d7f29b363f3ce37aa 100644 (file)
--- a/ir.h
+++ b/ir.h
@@ -144,6 +144,11 @@ public:
       v->visit(this);
    }
 
+   /**
+    * Get the name of the function for which this is a signature
+    */
+   const char *function_name() const;
+
    /**
     * Function return type.
     *
@@ -211,6 +216,11 @@ private:
     */
    struct exec_list signatures;
 };
+
+inline const char *ir_function_signature::function_name() const
+{
+   return function->name;
+}
 /*@}*/
 
 
@@ -379,8 +389,7 @@ public:
     */
    const char *callee_name() const
    {
-      /* FINISHME: This only works for functions that have definitions. */
-      return callee->definition->label;
+      return callee->function_name();
    }
 
 private: