summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-08-03 20:30:53 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-08-03 20:30:53 +0000
commit693744127b055b760b11069e441601eff1fbb378 (patch)
treecbebaebc6266f0e2f76a724dc4afe01c1073b3c9 /llvm/lib/AsmParser
parent893f6767344ad00780da34c51d5fc754dda214db (diff)
downloadbcm5719-llvm-693744127b055b760b11069e441601eff1fbb378.tar.gz
bcm5719-llvm-693744127b055b760b11069e441601eff1fbb378.zip
Try to fix the build for C++ standard libraries missing std::map::emplace
llvm-svn: 243899
Diffstat (limited to 'llvm/lib/AsmParser')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp5
-rw-r--r--llvm/lib/AsmParser/LLParser.h10
2 files changed, 7 insertions, 8 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 497b4972e68..d1d379242e0 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/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<ValID, GlobalValue *>())
.first->second.insert(std::make_pair(std::move(Label), nullptr))
.first->second;
if (!FwdRef)
diff --git a/llvm/lib/AsmParser/LLParser.h b/llvm/lib/AsmParser/LLParser.h
index acbf6f9e5b8..dbbb97ab62a 100644
--- a/llvm/lib/AsmParser/LLParser.h
+++ b/llvm/lib/AsmParser/LLParser.h
@@ -67,12 +67,12 @@ namespace llvm {
std::unique_ptr<Constant *[]> 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)
OpenPOWER on IntegriCloud