[llvm] AMDGPU: Verify function type matches when matching libcalls (PR #119043)
Sameer Sahasrabuddhe via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 8 21:15:25 PST 2024
================
@@ -620,17 +620,17 @@ bool ItaniumParamParser::parseItaniumParam(StringRef& param,
// parse type
char const TC = param.front();
if (isDigit(TC)) {
- res.ArgType = StringSwitch<AMDGPULibFunc::EType>
- (eatLengthPrefixedName(param))
- .Case("ocl_image1darray" , AMDGPULibFunc::IMG1DA)
- .Case("ocl_image1dbuffer", AMDGPULibFunc::IMG1DB)
- .Case("ocl_image2darray" , AMDGPULibFunc::IMG2DA)
- .Case("ocl_image1d" , AMDGPULibFunc::IMG1D)
- .Case("ocl_image2d" , AMDGPULibFunc::IMG2D)
- .Case("ocl_image3d" , AMDGPULibFunc::IMG3D)
- .Case("ocl_event" , AMDGPULibFunc::DUMMY)
- .Case("ocl_sampler" , AMDGPULibFunc::DUMMY)
- .Default(AMDGPULibFunc::DUMMY);
+ res.ArgType =
+ StringSwitch<AMDGPULibFunc::EType>(eatLengthPrefixedName(param))
+ .StartsWith("ocl_image1d_array", AMDGPULibFunc::IMG1DA)
----------------
ssahasra wrote:
Unrelated change in spellings? There's a function in this same file that produces the original spellings without the extra underscore.
https://github.com/llvm/llvm-project/pull/119043
More information about the llvm-commits
mailing list