llvm.org GIT mirror llvm / 4b67b5a
Quick fix for an use after free. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216071 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 6 years ago
1 changed file(s) with 4 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
528528 EE->addModule(std::move(XMod));
529529 }
530530
531 std::vector> Buffers;
531532 for (unsigned i = 0, e = ExtraObjects.size(); i != e; ++i) {
532533 ErrorOr> Obj =
533534 object::ObjectFile::createObjectFile(ExtraObjects[i]);
535536 Err.print(argv[0], errs());
536537 return 1;
537538 }
538 EE->addObjectFile(std::move(Obj.get().getBinary()));
539 object::OwningBinary &O = Obj.get();
540 EE->addObjectFile(std::move(O.getBinary()));
541 Buffers.push_back(std::move(O.getBuffer()));
539542 }
540543
541544 for (unsigned i = 0, e = ExtraArchives.size(); i != e; ++i) {