[PATCH] D129337: [llvm-objcopy][ELF] Add --set-section-type
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 12 10:07:54 PDT 2022
MaskRay added inline comments.
================
Comment at: llvm/tools/llvm-objcopy/ObjcopyOptions.cpp:241-242
if (!FlagValue.contains('='))
- return createStringError(
- errc::invalid_argument,
- "bad format for --set-section-alignment: missing '='");
+ return make_error<StringError>("bad format for " + Option + ": missing '='",
+ errc::invalid_argument);
auto Split = StringRef(FlagValue).split('=');
----------------
jhenderson wrote:
> I'm not sure I follow the reasoning for switch to make_error?
createStringError is a wrapper which accepts `const char *`. The underlying StringError constructor actually supports `Twine`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129337/new/
https://reviews.llvm.org/D129337
More information about the llvm-commits
mailing list