lhames added a comment. You may want to use Error (include/llvm/Support/Error.h) rather than std::error_code, though it should be pretty easy to switch over after the fact too. - Lang. http://reviews.llvm.org/D20550