[PATCH] D105519: [WebAssembly] Deduplicate imports of the same module name, field name, and type
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 5 12:04:38 PDT 2021
sbc100 added inline comments.
================
Comment at: lld/wasm/SyntheticSections.h:134
+// key in a `DenseMap`.
+template <typename T> struct llvm::DenseMapInfo<lld::wasm::ImportKey<T>> {
+ static lld::wasm::ImportKey<T> getEmptyKey() {
----------------
TaoPan wrote:
> sbc100 wrote:
> > sbc100 wrote:
> > > TaoPan wrote:
> > > > Please be note this line introduced below build error:
> > > > FAILED: tools/lld/wasm/CMakeFiles/lldWasm.dir/MapFile.cpp.o
> > > > /usr/bin/c++ -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/lld/wasm -I/media/sdb/tao/llvm/llvm-project-debug/lld/wasm -I/media/sdb/tao/llvm/llvm-project-debug/lld/include -Itools/lld/include -Iinclude -I/media/sdb/tao/llvm/llvm-project-debug/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -fno-exceptions -fno-rtti -std=c++14 -MD -MT tools/lld/wasm/CMakeFiles/lldWasm.dir/MapFile.cpp.o -MF tools/lld/wasm/CMakeFiles/lldWasm.dir/MapFile.cpp.o.d -o tools/lld/wasm/CMakeFiles/lldWasm.dir/MapFile.cpp.o -c /media/sdb/tao/llvm/llvm-project-debug/lld/wasm/MapFile.cpp
> > > > In file included from /media/sdb/tao/llvm/llvm-project-debug/lld/wasm/MapFile.cpp:28:0:
> > > > /media/sdb/tao/llvm/llvm-project-debug/lld/wasm/SyntheticSections.h:134:36: error: specialization of ‘template<class T> struct llvm::DenseMapInfo’ in different namespace [-fpermissive]
> > > > template <typename T> struct llvm::DenseMapInfo<lld::wasm::ImportKey<T>> {
> > > > ^
> > > > In file included from /media/sdb/tao/llvm/llvm-project-debug/lld/wasm/MapFile.h:12:0,
> > > > from /media/sdb/tao/llvm/llvm-project-debug/lld/wasm/MapFile.cpp:21:
> > > > /media/sdb/tao/llvm/llvm-project-debug/llvm/include/llvm/ADT/ArrayRef.h:29:31: error: from definition of ‘template<class T> struct llvm::DenseMapInfo’ [-fpermissive]
> > > > template<typename T> struct DenseMapInfo;
> > > What compiler are you using that gives this error? I'm guessing gcc or something that is not clang? (I'm surprised we didn't get any reports of bots failing? Any idea why your config might not be covered by any of the llvn bots?)
> > >
> > >
> > > @fitzgen can you take a look?
> > Looks like there is already a fix in flight: https://reviews.llvm.org/D107422
> Yes, it's gcc dependent error, I used gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12). My config command is
> cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;compiler-rt;lld" ../llvm
> Looks not very special. I know this error won't be triggered with "-D CMAKE_C_COMPILER=clang -D CMAKE_CXX_COMPILER=clang++".
Do we not have any bots that build with a recent enough gcc version to report this failure? Seems odd.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105519/new/
https://reviews.llvm.org/D105519
More information about the llvm-commits
mailing list