summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2008-05-16 20:39:43 +0000
committerEric Christopher <echristo@apple.com>2008-05-16 20:39:43 +0000
commit901b1a75c93ca8b92977c246d3c9db567e83147f (patch)
treebad9a663759928c698caae9386e22243c28d7bd3 /llvm/include
parentd5a4838e3da5355573d30115f12dda562be37232 (diff)
downloadbcm5719-llvm-901b1a75c93ca8b92977c246d3c9db567e83147f.tar.gz
bcm5719-llvm-901b1a75c93ca8b92977c246d3c9db567e83147f.zip
Add functions to enable adding a single attribute to a function and
its associated call site. llvm-svn: 51204
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Function.h3
-rw-r--r--llvm/include/llvm/Instructions.h6
2 files changed, 9 insertions, 0 deletions
diff --git a/llvm/include/llvm/Function.h b/llvm/include/llvm/Function.h
index 28c301fe2f6..5dd8502d3ab 100644
--- a/llvm/include/llvm/Function.h
+++ b/llvm/include/llvm/Function.h
@@ -170,6 +170,9 @@ public:
bool paramHasAttr(unsigned i, ParameterAttributes attr) const {
return ParamAttrs.paramHasAttr(i, attr);
}
+
+ /// addParamAttr - adds the attribute to the list of attributes.
+ void addParamAttr(unsigned i, ParameterAttributes attr);
/// @brief Extract the alignment for a call or parameter (0=unknown).
unsigned getParamAlignment(unsigned i) const {
diff --git a/llvm/include/llvm/Instructions.h b/llvm/include/llvm/Instructions.h
index ba46b2031e0..1bd2cba2195 100644
--- a/llvm/include/llvm/Instructions.h
+++ b/llvm/include/llvm/Instructions.h
@@ -1109,6 +1109,9 @@ public:
/// setParamAttrs - Sets the parameter attributes for this call.
void setParamAttrs(const PAListPtr &Attrs) { ParamAttrs = Attrs; }
+
+ /// addParamAttr - adds the attribute to the list of attributes.
+ void addParamAttr(unsigned i, ParameterAttributes attr);
/// @brief Determine whether the call or the callee has the given attribute.
bool paramHasAttr(unsigned i, unsigned attr) const;
@@ -2428,6 +2431,9 @@ public:
/// @brief Determine whether the call or the callee has the given attribute.
bool paramHasAttr(unsigned i, ParameterAttributes attr) const;
+
+ /// addParamAttr - adds the attribute to the list of attributes.
+ void addParamAttr(unsigned i, ParameterAttributes attr);
/// @brief Extract the alignment for a call or parameter (0=unknown).
unsigned getParamAlignment(unsigned i) const {
OpenPOWER on IntegriCloud