[all-commits] [llvm/llvm-project] 306fc2: [lldb] Fix build with GCC 9 after "[ADT] Use Empty...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Wed Jul 13 02:57:56 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 306fc2cd87f2a52c21eb3606eff33d78e25d9368
      https://github.com/llvm/llvm-project/commit/306fc2cd87f2a52c21eb3606eff33d78e25d9368
  Author: Martin Storsjö <martin at martin.st>
  Date:   2022-07-13 (Wed, 13 Jul 2022)

  Changed paths:
    M lldb/include/lldb/Utility/Environment.h

  Log Message:
  -----------
  [lldb] Fix build with GCC 9 after "[ADT] Use Empty Base Optimization for Allocators"

This fixes this compilation error, after
a565509308f9372c4de1c4c32afde461a42e81c8:

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)
      |            ^~~~~~~~~




More information about the All-commits mailing list