[lld] r305054 - [ELF] - Fix build bot.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 8 21:48:56 PDT 2017


Author: grimar
Date: Thu Jun  8 23:48:56 2017
New Revision: 305054

URL: http://llvm.org/viewvc/llvm-project?rev=305054&view=rev
Log:
[ELF] - Fix build bot.

SyntheticSections.cpp:1773:29: error: chosen constructor is explicit in copy-initialization
        CuVectors.push_back({});
                            ^~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/set:428:14: note: constructor declared here
    explicit set(const value_compare& __comp = value_compare())
             ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/vector:702:59: note: passing argument to parameter '__x' here
    _LIBCPP_INLINE_VISIBILITY void push_back(value_type&& __x);

Modified:
    lld/trunk/ELF/SyntheticSections.cpp

Modified: lld/trunk/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=305054&r1=305053&r2=305054&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.cpp (original)
+++ lld/trunk/ELF/SyntheticSections.cpp Thu Jun  8 23:48:56 2017
@@ -1770,7 +1770,7 @@ void GdbIndexSection::buildIndex() {
       std::tie(IsNew, Sym) = SymbolTable.add(Hash, Offset);
       if (IsNew) {
         Sym->CuVectorIndex = CuVectors.size();
-        CuVectors.push_back({});
+        CuVectors.resize(CuVectors.size() + 1);
       }
 
       CuVectors[Sym->CuVectorIndex].insert(CuId | (NameType.Type << 24));




More information about the llvm-commits mailing list