aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
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
commit7014f4626b0f9fb2e46078867096bb11ff90fdf4 (patch)
treec144c4b0a0cf3bb4b3e7d55726690106df2adcf8 /lib/VMCore
parentcad542c6e68d975a35847b2a85f233ad34a004f5 (diff)
downloadexternal_llvm-7014f4626b0f9fb2e46078867096bb11ff90fdf4.zip
external_llvm-7014f4626b0f9fb2e46078867096bb11ff90fdf4.tar.gz
external_llvm-7014f4626b0f9fb2e46078867096bb11ff90fdf4.tar.bz2
OCaml parameter attribute bindings from PR2752.
Incomplete, but better than nothing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71081 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/Core.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp
index 962f769..1fa83eb 100644
--- a/lib/VMCore/Core.cpp
+++ b/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) {