From: David Blaikie Date: Mon, 3 Aug 2015 20:30:53 +0000 (+0000) Subject: Try to fix the build for C++ standard libraries missing std::map::emplace X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=5b8c55e5b65ce4b5315f8609afb9b08a9e1d6850;ds=sidebyside Try to fix the build for C++ standard libraries missing std::map::emplace git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243899 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index 497b4972e68..d1d379242e0 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -2609,9 +2609,8 @@ bool LLParser::ParseValID(ValID &ID, PerFunctionState *PFS) { if (!F) { // Make a global variable as a placeholder for this reference. GlobalValue *&FwdRef = - ForwardRefBlockAddresses.emplace(std::piecewise_construct, - std::forward_as_tuple(std::move(Fn)), - std::forward_as_tuple()) + ForwardRefBlockAddresses.insert(std::make_pair, std::move(Fn), + std::map()) .first->second.insert(std::make_pair(std::move(Label), nullptr)) .first->second; if (!FwdRef) diff --git a/lib/AsmParser/LLParser.h b/lib/AsmParser/LLParser.h index acbf6f9e5b8..dbbb97ab62a 100644 --- a/lib/AsmParser/LLParser.h +++ b/lib/AsmParser/LLParser.h @@ -67,12 +67,12 @@ namespace llvm { std::unique_ptr ConstantStructElts; ValID() = default; - ValID(ValID &&RHS) + ValID(const ValID &RHS) : Kind(RHS.Kind), Loc(RHS.Loc), UIntVal(RHS.UIntVal), FTy(RHS.FTy), - StrVal(std::move(RHS.StrVal)), StrVal2(std::move(RHS.StrVal2)), - APSIntVal(std::move(RHS.APSIntVal)), - APFloatVal(std::move(RHS.APFloatVal)), ConstantVal(RHS.ConstantVal), - ConstantStructElts(std::move(RHS.ConstantStructElts)) {} + StrVal(RHS.StrVal), StrVal2(RHS.StrVal2), APSIntVal(RHS.APSIntVal), + APFloatVal(RHS.APFloatVal), ConstantVal(RHS.ConstantVal) { + assert(!RHS.ConstantStructElts); + } bool operator<(const ValID &RHS) const { if (Kind == t_LocalID || Kind == t_GlobalID)