I noticed that std::error_code() does one-time initialization. Avoid
that overhead with Expected<T> and llvm::Error. Also, it is consistent
with the virtual interface and ELF, and generally cleaner.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/tools/obj2yaml/coff2yaml.cpp | ||
---|---|---|
142 | In the binary utilities (e.g. obj2yaml), we tend to not capitalize error messages. I think the error message may be temporary, because we should propagate the error to the caller, instead of calling exit directly when something goes wrong. |
llvm/tools/obj2yaml/coff2yaml.cpp | ||
---|---|---|
142 | I'll lower case it. But, seeing as this is tool code, should we really propagate the error to the caller? Shouldn't the tool just exit here? |
In the binary utilities (e.g. obj2yaml), we tend to not capitalize error messages. I think the error message may be temporary, because we should propagate the error to the caller, instead of calling exit directly when something goes wrong.