Backport #https://github.com/llvm/llvm-project/pull/100461 fix into 19.x branch /chery-pick a27f816