forked from OSchip/llvm-project
parent
2661dfc7b9
commit
061beab673
|
@ -529,6 +529,7 @@ int main(int argc, char **argv, char * const *envp) {
|
||||||
EE->addModule(std::move(XMod));
|
EE->addModule(std::move(XMod));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<std::unique_ptr<MemoryBuffer>> Buffers;
|
||||||
for (unsigned i = 0, e = ExtraObjects.size(); i != e; ++i) {
|
for (unsigned i = 0, e = ExtraObjects.size(); i != e; ++i) {
|
||||||
ErrorOr<object::OwningBinary<object::ObjectFile>> Obj =
|
ErrorOr<object::OwningBinary<object::ObjectFile>> Obj =
|
||||||
object::ObjectFile::createObjectFile(ExtraObjects[i]);
|
object::ObjectFile::createObjectFile(ExtraObjects[i]);
|
||||||
|
@ -536,7 +537,9 @@ int main(int argc, char **argv, char * const *envp) {
|
||||||
Err.print(argv[0], errs());
|
Err.print(argv[0], errs());
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
EE->addObjectFile(std::move(Obj.get().getBinary()));
|
object::OwningBinary<object::ObjectFile> &O = Obj.get();
|
||||||
|
EE->addObjectFile(std::move(O.getBinary()));
|
||||||
|
Buffers.push_back(std::move(O.getBuffer()));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (unsigned i = 0, e = ExtraArchives.size(); i != e; ++i) {
|
for (unsigned i = 0, e = ExtraArchives.size(); i != e; ++i) {
|
||||||
|
|
Loading…
Reference in New Issue