summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Core.cpp
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2013-04-16 23:12:43 +0000
committerTom Stellard <thomas.stellard@amd.com>2013-04-16 23:12:43 +0000
commite8f35e1557cbc58b12fb7ec3750e64c6933e9905 (patch)
tree42015341616e170531add89abe9580c0420b988f /llvm/lib/IR/Core.cpp
parent6cd3e560fddd19caef71f4fbd9242fdb53163801 (diff)
downloadbcm5719-llvm-e8f35e1557cbc58b12fb7ec3750e64c6933e9905.tar.gz
bcm5719-llvm-e8f35e1557cbc58b12fb7ec3750e64c6933e9905.zip
C API: Add LLVMAddTargetDependentFunctionAttr()
llvm-svn: 179645
Diffstat (limited to 'llvm/lib/IR/Core.cpp')
-rw-r--r--llvm/lib/IR/Core.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp
index f1f7eb31bb3..e769ab4e7d0 100644
--- a/llvm/lib/IR/Core.cpp
+++ b/llvm/lib/IR/Core.cpp
@@ -1443,6 +1443,17 @@ void LLVMAddFunctionAttr(LLVMValueRef Fn, LLVMAttribute PA) {
Func->setAttributes(PALnew);
}
+void LLVMAddTargetDependentFunctionAttr(LLVMValueRef Fn, const char *A,
+ const char *V) {
+ Function *Func = unwrap<Function>(Fn);
+ int Idx = AttributeSet::FunctionIndex;
+ AttrBuilder B;
+
+ B.addAttribute(A, V);
+ AttributeSet Set = AttributeSet::get(Func->getContext(), Idx, B);
+ Func->addAttributes(Idx, Set);
+}
+
void LLVMRemoveFunctionAttr(LLVMValueRef Fn, LLVMAttribute PA) {
Function *Func = unwrap<Function>(Fn);
const AttributeSet PAL = Func->getAttributes();
OpenPOWER on IntegriCloud