diff --git a/src/gallium/frontends/clover/llvm/codegen/common.cpp b/src/gallium/frontends/clover/llvm/codegen/common.cpp index ff87d9c2a0a..a95da068b1f 100644 --- a/src/gallium/frontends/clover/llvm/codegen/common.cpp +++ b/src/gallium/frontends/clover/llvm/codegen/common.cpp @@ -203,7 +203,7 @@ namespace { // Other types. const auto actual_type = isa< ::llvm::PointerType>(arg_type) && arg.hasByValAttr() ? - cast< ::llvm::PointerType>(arg_type)->getElementType() : arg_type; + cast< ::llvm::PointerType>(arg_type)->getPointerElementType() : arg_type; if (actual_type->isPointerTy()) { const unsigned address_space = @@ -214,7 +214,7 @@ namespace { static_cast(clang::LangAS::opencl_local); if (address_space == map[offset]) { const auto pointee_type = cast< - ::llvm::PointerType>(actual_type)->getElementType(); + ::llvm::PointerType>(actual_type)->getPointerElementType(); args.emplace_back(binary::argument::local, arg_api_size, target_size, dl.getABITypeAlignment(pointee_type),