diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/radeon/radeon_llvm_util.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gallium/drivers/radeon/radeon_llvm_util.cpp b/src/gallium/drivers/radeon/radeon_llvm_util.cpp index 5f63ed7a9c6..fcfb6d8966d 100644 --- a/src/gallium/drivers/radeon/radeon_llvm_util.cpp +++ b/src/gallium/drivers/radeon/radeon_llvm_util.cpp @@ -43,12 +43,7 @@ extern "C" unsigned radeon_llvm_get_num_kernels(const unsigned char *bitcode, unsigned bitcode_len) { LLVMModuleRef mod = radeon_llvm_parse_bitcode(bitcode, bitcode_len); - llvm::Module *M = llvm::unwrap(mod); - const llvm::NamedMDNode *kernel_node - = M->getNamedMetadata("opencl.kernels"); - unsigned kernel_count = kernel_node->getNumOperands(); - delete M; - return kernel_count; + return LLVMGetNamedMetadataNumOperands(mod, "opencl.kernels"); } extern "C" LLVMModuleRef radeon_llvm_get_kernel_module(unsigned index, |