[PATCH] D129337: [llvm-objcopy][ELF] Add --set-section-type
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 12 01:06:38 PDT 2022
jhenderson 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('=');
----------------
I'm not sure I follow the reasoning for switch to make_error?
================
Comment at: llvm/tools/llvm-objcopy/ObjcopyOptions.cpp:818
+ // Prohibit combinations of --set-section-{flags,type} when the section name
+ // as used by the destination of a --rename-section.
for (const auto &E : Config.SectionsToRename) {
----------------
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