summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-03-26 17:29:29 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-03-26 17:29:29 -0700
commit93614bc4b971bb59824179057a4bfa7aac383ce3 (patch)
treead1c0e6c737aafd7b775b78a6334a32a60ee133e
parent9f93d24050b2cccf539a944f674784c38cee857a (diff)
Add hack ir_call::callee_name to get the name of the called function
-rw-r--r--ir.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/ir.h b/ir.h
index 98455f7c37..e6cdf29ebd 100644
--- a/ir.h
+++ b/ir.h
@@ -327,6 +327,15 @@ public:
return actual_parameters.iterator();
}
+ /**
+ * Get the name of the function being called.
+ */
+ const char *callee_name() const
+ {
+ /* FINISHME: This only works for functions that have definitions. */
+ return callee->definition->label;
+ }
+
private:
ir_call()
: ir_rvalue(), callee(NULL)