diff options
Diffstat (limited to 'src/amd/common/ac_llvm_helper.cpp')
-rw-r--r-- | src/amd/common/ac_llvm_helper.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/amd/common/ac_llvm_helper.cpp b/src/amd/common/ac_llvm_helper.cpp index 495bd98da9c..48a5a44e392 100644 --- a/src/amd/common/ac_llvm_helper.cpp +++ b/src/amd/common/ac_llvm_helper.cpp @@ -36,6 +36,7 @@ #include <llvm/IR/Attributes.h> #include <llvm/IR/CallSite.h> #include <llvm/IR/IRBuilder.h> +#include <llvm/Analysis/TargetLibraryInfo.h> void ac_add_attr_dereferenceable(LLVMValueRef val, uint64_t bytes) { @@ -97,3 +98,15 @@ LLVMBuilderRef ac_create_builder(LLVMContextRef ctx, return builder; } + +LLVMTargetLibraryInfoRef +ac_create_target_library_info(const char *triple) +{ + return reinterpret_cast<LLVMTargetLibraryInfoRef>(new llvm::TargetLibraryInfoImpl(llvm::Triple(triple))); +} + +void +ac_dispose_target_library_info(LLVMTargetLibraryInfoRef library_info) +{ + delete reinterpret_cast<llvm::TargetLibraryInfoImpl *>(library_info); +} |