On 13/04/17 03:15 AM, Francisco Jerez wrote: > Michel Dänzer <mic...@daenzer.net> writes: > >> From: Michel Dänzer <michel.daen...@amd.com> >> >> clang::LangAS::Offset is gone, the behaviour is as if it was 0. >> Signed-off-by: Michel Dänzer <michel.daen...@amd.com> >> --- >> src/gallium/state_trackers/clover/llvm/codegen/common.cpp | 5 ++++- >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/src/gallium/state_trackers/clover/llvm/codegen/common.cpp >> b/src/gallium/state_trackers/clover/llvm/codegen/common.cpp >> index 13ccd591c1..9c81cc5acb 100644 >> --- a/src/gallium/state_trackers/clover/llvm/codegen/common.cpp >> +++ b/src/gallium/state_trackers/clover/llvm/codegen/common.cpp >> @@ -129,7 +129,10 @@ namespace { >> cast<::llvm::PointerType>(actual_type)->getAddressSpace(); >> >> if (address_space == >> address_spaces[clang::LangAS::opencl_local >> - - >> clang::LangAS::Offset]) { >> +#if HAVE_LLVM < 0x0500 >> + - clang::LangAS::Offset >> +#endif > > Please let's not obfuscate this further with compatibility preprocessor > conditionals mid-expression, you could instead add a conditional define > into the llvm/compat.hpp file along the lines of: > > +#if HAVE_LLVM >= 0x0500 > + const auto lang_as_offset = 0; > +#else > + const auto lang_as_offset = clang::LangAS::Offset; > +#endif > > With that cleaned up patch is: > > Reviewed-by: Francisco Jerez <curroje...@riseup.net>
Pushed v2, which is hopefully what you were thinking of, thanks! -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev