OrcJIT: Avoid non-static initializers.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Sun, 25 Jan 2015 11:41:49 +0000 (11:41 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Sun, 25 Jan 2015 11:41:49 +0000 (11:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227041 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ExecutionEngine/Orc/IRCompileLayer.h
lib/ExecutionEngine/Orc/OrcMCJITReplacement.h

index 0851b1b..1664adf 100644 (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)};
   }
index 03289ed..eae8f74 100644 (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)