A better implementation may be doable following suggestions from there:
I don't have enough knowledge of Mesa and LLVM to implement the suggestion.
@currojerez said he would ACK this workaround anyway.
The workaround works by passing
-no-opaque-pointers to clang so it works as before even if LLVM is built with opaque pointers by default.
Note: see also !16002 (merged) for another fix for another Mesa/LLVM mismatch.