diff options
Diffstat (limited to 'src/amd/common/ac_llvm_util.c')
-rw-r--r-- | src/amd/common/ac_llvm_util.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/amd/common/ac_llvm_util.c b/src/amd/common/ac_llvm_util.c index e20456e2ff8..ee5fc89a2df 100644 --- a/src/amd/common/ac_llvm_util.c +++ b/src/amd/common/ac_llvm_util.c @@ -217,3 +217,13 @@ ac_dump_module(LLVMModuleRef module) fprintf(stderr, "%s", str); LLVMDisposeMessage(str); } + +void +ac_llvm_add_target_dep_function_attr(LLVMValueRef F, + const char *name, int value) +{ + char str[16]; + + snprintf(str, sizeof(str), "%i", value); + LLVMAddTargetDependentFunctionAttr(F, name, str); +} |