Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
Thanks for the nice cleanup. I spotted an issue though, see below.
llvm/tools/gold/gold-plugin.cpp | ||
---|---|---|
270 | I think this one needs a fix, presumably just Num(opt_) now? Looks like there isn't a good way to test this unfortunately, unless the garbage read causes the get_threadpool_strategy call below to fail. Can you find or add a way to test this parameter? |
llvm/tools/gold/gold-plugin.cpp | ||
---|---|---|
270 | This is correct, because opt_ is the original const char * (unmodified). As you said, using opt is better. I'll fix that. Actually, 4 tests check that we can't pass garbage to get_threadpool_strategy: /usr/bin/ld.gold: fatal error: Invalid parallelism level: jobs=1 -- ******************** ******************** Failing Tests (4): LLVM :: tools/gold/X86/thinlto.ll LLVM :: tools/gold/X86/thinlto_afdo.ll LLVM :: tools/gold/X86/thinlto_archive.ll LLVM :: tools/gold/X86/thinlto_cspgo.ll |
lgtm
llvm/tools/gold/gold-plugin.cpp | ||
---|---|---|
270 | Ah right, missed the fact that it used the original char pointer. Glad the tests catch any issues here. |
I think this one needs a fix, presumably just Num(opt_) now?
Looks like there isn't a good way to test this unfortunately, unless the garbage read causes the get_threadpool_strategy call below to fail. Can you find or add a way to test this parameter?