[PATCH] D129206: [ADT] Use Empty Base Optimization for Allocators

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 13 01:40:18 PDT 2022


mstorsjo added a comment.

This broke building lldb with GCC 9:

  In file included from ../tools/lldb/include/lldb/Host/Host.h:14,
                   from ../tools/lldb/source/Host/common/File.cpp:28:
  ../tools/lldb/include/lldb/Utility/Environment.h: In copy constructor ‘lldb_private::Environment::Environment(const lldb_private::Environment&)’:
  ../tools/lldb/include/lldb/Utility/Environment.h:60:49: error: call of overloaded ‘StringMap(const lldb_private::Environment&)’ is ambiguous
     60 |   Environment(const Environment &RHS) : Base(RHS) {}
        |                                                 ^
  In file included from ../include/llvm/Support/YAMLTraits.h:16,
                   from ../tools/lldb/include/lldb/Utility/ConstString.h:15,
                   from ../tools/lldb/include/lldb/Utility/FileSpec.h:15,
                   from ../tools/lldb/include/lldb/Host/FileSystem.h:14,
                   from ../tools/lldb/source/Host/common/File.cpp:27:
  ../include/llvm/ADT/StringMap.h:137:3: note: candidate: ‘llvm::StringMap<ValueTy, AllocatorTy>::StringMap(const llvm::StringMap<ValueTy, AllocatorTy>&) [with ValueTy = std::__cxx11::basic_string<char>; AllocatorTy = llvm::MallocAllocator]’
    137 |   StringMap(const StringMap &RHS)
        |   ^~~~~~~~~
  ../include/llvm/ADT/StringMap.h:122:12: note: candidate: ‘llvm::StringMap<ValueTy, AllocatorTy>::StringMap(AllocatorTy) [with ValueTy = std::__cxx11::basic_string<char>; AllocatorTy = llvm::MallocAllocator]’
    122 |   explicit StringMap(AllocatorTy A)
        |            ^~~~~~~~~


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129206/new/

https://reviews.llvm.org/D129206



More information about the llvm-commits mailing list