v.g.vassilev added a comment. Could you move the Build* functions in a utility class/namespace. I need something very similar for my ongoing work on the libInterpreter patch and I'd like to reuse that part of the patch. Repository: rL LLVM https://reviews.llvm.org/D27180