This patch adds support for translation of the OpenMP barrier construct to LLVM IR. The OpenMP IRBuilder is used for this translation. In this patch the code for translation is added to the existing LLVM dialect translation to LLVM IR.
The patch includes code changes and a testcase.
cl::opt are only intended for testing, I wouldn't expect it in library code.