summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Core.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-05-06 12:21:17 +0000
committerDuncan Sands <baldrick@free.fr>2009-05-06 12:21:17 +0000
commit7374a0118da11c07df617aeaa26b0f70a69603f2 (patch)
tree966c3df061f9ce4f571e1d07bca87bce4b22f73c /llvm/lib/VMCore/Core.cpp
parentea8c48d5a1c14a221db5d4033de1b43e716d3490 (diff)
downloadbcm5719-llvm-7374a0118da11c07df617aeaa26b0f70a69603f2.tar.gz
bcm5719-llvm-7374a0118da11c07df617aeaa26b0f70a69603f2.zip
OCaml parameter attribute bindings from PR2752.
Incomplete, but better than nothing. llvm-svn: 71081
Diffstat (limited to 'llvm/lib/VMCore/Core.cpp')
-rw-r--r--llvm/lib/VMCore/Core.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Core.cpp b/llvm/lib/VMCore/Core.cpp
index 962f7694927..1fa83ebd1c0 100644
--- a/llvm/lib/VMCore/Core.cpp
+++ b/llvm/lib/VMCore/Core.cpp
@@ -776,6 +776,20 @@ void LLVMSetGC(LLVMValueRef Fn, const char *GC) {
F->clearGC();
}
+void LLVMAddFunctionAttr(LLVMValueRef Fn, LLVMAttribute PA) {
+ Function *Func = unwrap<Function>(Fn);
+ const AttrListPtr PAL = Func->getAttributes();
+ const AttrListPtr PALnew = PAL.addAttr(0, PA);
+ Func->setAttributes(PALnew);
+}
+
+void LLVMRemoveFunctionAttr(LLVMValueRef Fn, LLVMAttribute PA) {
+ Function *Func = unwrap<Function>(Fn);
+ const AttrListPtr PAL = Func->getAttributes();
+ const AttrListPtr PALnew = PAL.removeAttr(0, PA);
+ Func->setAttributes(PALnew);
+}
+
/*--.. Operations on parameters ............................................--*/
unsigned LLVMCountParams(LLVMValueRef FnRef) {
OpenPOWER on IntegriCloud