Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp | ||
---|---|---|
81–85 | This should actually check that the integer is nonnegative, and the name should reflect this (NonNegInt?) |
llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp | ||
---|---|---|
81–85 | What are your thoughts on me changing the types of the Options to also be non-negative types. in this case ScanInterval and MaxConcurrency will become unsigned and usize_t respectivelly, which will catch the error of passing non-negative integers at parse time. |
llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp | ||
---|---|---|
81–85 | Hmm, actually if this is intended to be a NFC change (oh, which should probably have the [NFC] commit label, as a nit-pick), it would probably be better to just change the error message to ": expected an integer...". |
It would also be nice to update the bazel build. Technically we (because we don't work in google3) aren't required to keep the bazel build clean, though Google LLVM integrators will often see a commit was broken by a @ google.com address and ask that you fix it.
In these cases, it might not be immediately obvious to the integrator how to fix this issues so it would certainly be courteous to fix it before landing. You can opt to join the bazel-build group https://reviews.llvm.org/project/profile/107/ which will add precommit checks to ensure the bazel build built cleanly.
Though feel free to ignore
llvm/tools/llvm-debuginfod/CMakeLists.txt | ||
---|---|---|
13 |
@mysterymath I do not have commit access yet, as the reviewer, if you think everything is ready to go could you please commit it for me? Thanks
I couldn't find usages of llvm-debuginfod in the bazel files, I am assuming we currently do not build llvm-debuginfod with bazel given that it is not part of the default targets.
llvm/tools/llvm-debuginfod/CMakeLists.txt | ||
---|---|---|
13 | You are very right, I copy pasted it from another |
This is causing a build failure for me, using gcc-13 on 32-bit x86:
samu: job failed: /usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ -m32 -mfpmath=sse -DCPPHTTPLIB_OPENSSL_SUPPORT -DCPPHTTPLIB_ZLIB_SUPPORT -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LIBCPP_ENABLE_ASSERTIONS -D__STDC_CONSTANT_M ACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/sys-devel/llvm-17.0.0_pre20230527/work/llvm_build-abi_x86_32.x86/ tools/llvm-debuginfod -I/var/tmp/portage/sys-devel/llvm-17.0.0_pre20230527/work/llvm/tools/llvm-debuginfod -I/var/tmp/portage/sys-devel /llvm-17.0.0_pre20230527/work/llvm_build-abi_x86_32.x86/include -I/var/tmp/portage/sys-devel/llvm-17.0.0_pre20230527/work/llvm/include -march=znver2 --param=l1-cache-size=32 --param=l1-cache-line-size=64 -O2 -pipe -frecord-gcc-switches -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-m issing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant- move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wc tad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -std=c++17 -UNDEBUG -MD -MT tools/llvm-debuginfod/CMakeFi les/llvm-debuginfod.dir/llvm-debuginfod.cpp.o -MF tools/llvm-debuginfod/CMakeFiles/llvm-debuginfod.dir/llvm-debuginfod.cpp.o.d -o tools /llvm-debuginfod/CMakeFiles/llvm-debuginfod.dir/llvm-debuginfod.cpp.o -c /var/tmp/portage/sys-devel/llvm-17.0.0_pre20230527/work/llvm/t ools/llvm-debuginfod/llvm-debuginfod.cpp /var/tmp/portage/sys-devel/llvm-17.0.0_pre20230527/work/llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp: In function ‘void parseArgs(int , char**)’: /var/tmp/portage/sys-devel/llvm-17.0.0_pre20230527/work/llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp:113:14: error: no matching funct ion for call to ‘parseIntArg(llvm::opt::InputArgList&, {anonymous}::ID, size_t&, long unsigned int)’ 113 | parseIntArg(Args, OPT_max_concurrency, MaxConcurrency, 0ul); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /var/tmp/portage/sys-devel/llvm-17.0.0_pre20230527/work/llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp:77:13: note: candidate: ‘templat e<class T> void parseIntArg(const llvm::opt::InputArgList&, int, T&, T)’ 77 | static void parseIntArg(const opt::InputArgList &Args, int ID, T &Value, | ^~~~~~~~~~~ /var/tmp/portage/sys-devel/llvm-17.0.0_pre20230527/work/llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp:77:13: note: template argument deduction/substitution failed: /var/tmp/portage/sys-devel/llvm-17.0.0_pre20230527/work/llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp:113:14: note: deduced conflicting types for parameter ‘T’ (‘unsigned int’ and ‘long unsigned int’) 113 | parseIntArg(Args, OPT_max_concurrency, MaxConcurrency, 0ul); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ samu: subcommand failed
This breaks building on windows: http://45.33.8.238/win/79161/step_4.txt
Please take a look and revert for now if it takes a while to fix.
I want to revert it but I don't have commit access, if you do have commit access could you please revert on my behalf? Thanks!
This is a reland of https://reviews.llvm.org/D151273 which
had to be reverted because size_t type is implementation
dependant and the original change was assuming unsigned long
for the default value of one the command line arguments.
llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp | ||
---|---|---|
113 | In the previous version, this was using 0ul as the default value which was breaking some targets. |