[PATCH] D11787: Port the error functions from ELF to COFF.
Rui Ueyama
ruiu at google.com
Wed Aug 5 16:31:24 PDT 2015
ruiu added a comment.
Handling errors with "eist immediately when error" policy seems good to me, but it makes error codes defined in error.h useless since we no longer return errors as return values. Maybe we should remove them.
================
Comment at: COFF/Driver.h:30-34
@@ -29,1 +29,7 @@
+LLVM_ATTRIBUTE_NORETURN void error(Twine Msg);
+void error(std::error_code EC, Twine Prefix);
+template <typename T> void error(const ErrorOr<T> &V, Twine Prefix) {
+ error(V.getError(), Prefix);
+}
+
----------------
error() does not particularly belong to Driver, so piggy-backing it with Driver doesn't seem a good idea to me. I'd move it to Error.h.
Repository:
rL LLVM
http://reviews.llvm.org/D11787
More information about the llvm-commits
mailing list