zequanwu added a comment. In D137217#3944952 <https://reviews.llvm.org/D137217#3944952>, @glandium wrote:
> This broke the gold plugin: > > [task 2022-11-22T21:03:29.486Z] > /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1108:19: > error: no matching function for call to 'localCache' > [task 2022-11-22T21:03:29.486Z] Cache = check(localCache("ThinLTO", > "Thin", options::cache_dir, AddBuffer)); > [task 2022-11-22T21:03:29.487Z] ^~~~~~~~~~ > [task 2022-11-22T21:03:29.487Z] > /builds/worker/fetches/llvm-project/llvm/include/llvm/Support/Caching.h:72:21: > note: candidate function not viable: no known conversion from '(lambda at > /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1102:20)' > to 'llvm::AddBufferFn' (aka 'function<void (unsigned int, const llvm::Twine > &, std::unique_ptr<MemoryBuffer>)>') for 4th argument > [task 2022-11-22T21:03:29.487Z] Expected<FileCache> localCache( > [task 2022-11-22T21:03:29.488Z] ^ > [task 2022-11-22T21:03:29.488Z] > /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1110:18: > error: no viable conversion from '(lambda at > /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20)' > to 'llvm::AddStreamFn' (aka > 'function<Expected<std::unique_ptr<CachedFileStream>> (unsigned int, const > llvm::Twine &)>') > [task 2022-11-22T21:03:29.488Z] check(Lto->run(AddStream, Cache)); > [task 2022-11-22T21:03:29.488Z] ^~~~~~~~~ > [task 2022-11-22T21:03:29.488Z] > /builds/worker/fetches/sysroot/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_function.h:421:7: > note: candidate constructor not viable: no known conversion from '(lambda at > /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20)' > to 'std::nullptr_t' (aka 'nullptr_t') for 1st argument > [task 2022-11-22T21:03:29.488Z] function(nullptr_t) noexcept > [task 2022-11-22T21:03:29.488Z] ^ > [task 2022-11-22T21:03:29.489Z] > /builds/worker/fetches/sysroot/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_function.h:432:7: > note: candidate constructor not viable: no known conversion from '(lambda at > /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20)' > to 'const > std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, > std::default_delete<llvm::CachedFileStream>>> (unsigned int, const > llvm::Twine &)> &' for 1st argument > [task 2022-11-22T21:03:29.489Z] function(const function& __x); > [task 2022-11-22T21:03:29.489Z] ^ > [task 2022-11-22T21:03:29.489Z] > /builds/worker/fetches/sysroot/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_function.h:441:7: > note: candidate constructor not viable: no known conversion from '(lambda at > /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20)' > to 'std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, > std::default_delete<llvm::CachedFileStream>>> (unsigned int, const > llvm::Twine &)> &&' for 1st argument > [task 2022-11-22T21:03:29.489Z] function(function&& __x) noexcept : > _Function_base() > [task 2022-11-22T21:03:29.489Z] ^ > [task 2022-11-22T21:03:29.489Z] > /builds/worker/fetches/sysroot/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_function.h:465:2: > note: candidate template ignored: substitution failure [with _Functor = > (lambda at > /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20), > $1 = void]: no type named 'type' in 'std::result_of<(lambda at > /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20) > &(unsigned int, const llvm::Twine &)>' > [task 2022-11-22T21:03:29.489Z] function(_Functor); > [task 2022-11-22T21:03:29.489Z] ^ > [task 2022-11-22T21:03:29.489Z] > /builds/worker/fetches/llvm-project/llvm/include/llvm/LTO/LTO.h:278:25: note: > passing argument to parameter 'AddStream' here > [task 2022-11-22T21:03:29.489Z] Error run(AddStreamFn AddStream, > FileCache Cache = nullptr); > [task 2022-11-22T21:03:29.489Z] ^ > [task 2022-11-22T21:03:29.489Z] 2 errors generated. Thanks for noticing. I have fixed at https://reviews.llvm.org/rG10a43c4641c20e0a50edc0ff99915c837a507cc1. Unfortunately, this patch is reverted right before that fix pushed. I relanded this at https://reviews.llvm.org/rG84be92d26fcb1ddad533c0c614a79a81c59f795d. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137217/new/ https://reviews.llvm.org/D137217 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits