summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-03-04 01:40:07 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-03-04 01:40:07 +0000
commitb9cc659efec95a612d005263817d1047aae89e40 (patch)
tree1b0207020bc0686658d3c8e52be6d4bb7b7d16a0 /llvm/lib
parent310e4b592f78091557d3cf14bda3606af1d28f9e (diff)
downloadbcm5719-llvm-b9cc659efec95a612d005263817d1047aae89e40.tar.gz
bcm5719-llvm-b9cc659efec95a612d005263817d1047aae89e40.zip
LLParser: Avoid copying ValIDs, the copy ctor is deprecated in C++11 due to the presence of a user-declared dtor
llvm-svn: 231199
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 925af4e17e1..a07a109cf66 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -2512,7 +2512,12 @@ bool LLParser::ParseValID(ValID &ID, PerFunctionState *PFS) {
if (!F) {
// Make a global variable as a placeholder for this reference.
- GlobalValue *&FwdRef = ForwardRefBlockAddresses[Fn][Label];
+ GlobalValue *&FwdRef =
+ 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)
FwdRef = new GlobalVariable(*M, Type::getInt8Ty(Context), false,
GlobalValue::InternalLinkage, nullptr, "");
OpenPOWER on IntegriCloud