LLParser: Avoid copying ValIDs, the copy ctor is deprecated in C++11 due to the presence of a user-declared dtor

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231199 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie 2015-03-04 01:40:07 +00:00
parent bd490c174e
commit de2cab9eb4

View File

@ -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, "");