diff options
author | Tom Stellard <[email protected]> | 2013-03-07 16:51:10 -0500 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2013-03-13 16:01:31 +0000 |
commit | b34b8576ecde91c4d1898e7b9cd35f87b4ec2aa5 (patch) | |
tree | 4b8197e936df0d5c4c6ec9c2328e708d8c8ddbfb /src | |
parent | 7e9abbea15bf6ff717c1908870d9c2de219d69b4 (diff) |
radeon/llvm: Implement radeon_llvm_get_num_kernels() using the C API
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, |