diff options
author | David Blaikie <dblaikie@gmail.com> | 2015-03-04 01:40:07 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2015-03-04 01:40:07 +0000 |
commit | b9cc659efec95a612d005263817d1047aae89e40 (patch) | |
tree | 1b0207020bc0686658d3c8e52be6d4bb7b7d16a0 /llvm/lib | |
parent | 310e4b592f78091557d3cf14bda3606af1d28f9e (diff) | |
download | bcm5719-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.cpp | 7 |
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, ""); |