1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

OrcJIT: Avoid non-static initializers.

llvm-svn: 227041
This commit is contained in:
NAKAMURA Takumi 2015-01-25 11:41:49 +00:00
parent 011afe58eb
commit 15029debe0
2 changed files with 3 additions and 3 deletions

View File

@ -101,12 +101,12 @@ private:
tryToLoadFromObjectCache(const Module &M) {
std::unique_ptr<MemoryBuffer> ObjBuffer = ObjCache->getObject(&M);
if (!ObjBuffer)
return {nullptr, nullptr};
return object::OwningBinary<object::ObjectFile>();
ErrorOr<std::unique_ptr<object::ObjectFile>> Obj =
object::ObjectFile::createObjectFile(ObjBuffer->getMemBufferRef());
if (!Obj)
return {nullptr, nullptr};
return object::OwningBinary<object::ObjectFile>();
return {std::move(*Obj), std::move(ObjBuffer)};
}

View File

@ -258,7 +258,7 @@ private:
const ObjListT &Objects,
const LoadedObjInfoListT &Infos) const {
M.UnfinalizedSections[H] = std::move(M.SectionsAllocatedSinceLastLoad);
M.SectionsAllocatedSinceLastLoad = SectionAddrSet{};
M.SectionsAllocatedSinceLastLoad = SectionAddrSet();
assert(Objects.size() == Infos.size() &&
"Incorrect number of Infos for Objects.");
for (unsigned I = 0; I < Objects.size(); ++I)