aboutsummaryrefslogtreecommitdiff
path: root/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
commit0bf7b414ae0bb6699cadc3a210d18cfec44e9354 (patch)
treee971e77f496a9001380a6cf15a17f52af1b923e0 /lib/VMCore/Function.cpp
parentea7dd407149332e5ab1ffc42c8344ecd1751008f (diff)
Add functions to enable adding a single attribute to a function and
its associated call site. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51204 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Function.cpp')
-rw-r--r--lib/VMCore/Function.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp
index 9f7eefe1a6..49e69e1b2c 100644
--- a/lib/VMCore/Function.cpp
+++ b/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