summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Function.cpp
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/lib/VMCore/Function.cpp
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/lib/VMCore/Function.cpp')
-rw-r--r--llvm/lib/VMCore/Function.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Function.cpp b/llvm/lib/VMCore/Function.cpp
index 9f7eefe1a6b..49e69e1b2c1 100644
--- a/llvm/lib/VMCore/Function.cpp
+++ b/llvm/lib/VMCore/Function.cpp
@@ -240,6 +240,12 @@ void Function::setDoesNotThrow(bool doesNotThrow) {
setParamAttrs(PAL);
}
+void Function::addParamAttr(unsigned i, ParameterAttributes attr) {
+ PAListPtr PAL = getParamAttrs();
+ PAL = PAL.addAttr(i, attr);
+ setParamAttrs(PAL);
+}
+
// Maintain the collector name for each function in an on-the-side table. This
// saves allocating an additional word in Function for programs which do not use
// GC (i.e., most programs) at the cost of increased overhead for clients which
OpenPOWER on IntegriCloud