diff options
author | Duncan Sands <baldrick@free.fr> | 2009-05-06 12:21:17 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2009-05-06 12:21:17 +0000 |
commit | e149e9960ba0726f4b084763f7ef95afa12d9a88 (patch) | |
tree | c144c4b0a0cf3bb4b3e7d55726690106df2adcf8 /lib/VMCore/Core.cpp | |
parent | a9cad0e7e09e6d34de2fccb4f1294b7f0b8f3b68 (diff) | |
download | external_llvm-e149e9960ba0726f4b084763f7ef95afa12d9a88.zip external_llvm-e149e9960ba0726f4b084763f7ef95afa12d9a88.tar.gz external_llvm-e149e9960ba0726f4b084763f7ef95afa12d9a88.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/Core.cpp')
-rw-r--r-- | lib/VMCore/Core.cpp | 14 |
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) { |