nir: add some macros to deal with c++ implicit casting rules

Karol Herbst requested to merge karolherbst/mesa:enum_helpers into master

With that it's easier now to just or nir_variable_mode, but maybe there are other enums used like that in c++ code and we could make it work for those as well.

Merge request reports