From 15029debe0f6f43422cb9318e58e28eb66c6550e Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sun, 25 Jan 2015 11:41:49 +0000 Subject: [PATCH] OrcJIT: Avoid non-static initializers. llvm-svn: 227041 --- include/llvm/ExecutionEngine/Orc/IRCompileLayer.h | 4 ++-- lib/ExecutionEngine/Orc/OrcMCJITReplacement.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h b/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h index 0851b1b3143..1664adf8933 100644 --- a/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h +++ b/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h @@ -101,12 +101,12 @@ private: tryToLoadFromObjectCache(const Module &M) { std::unique_ptr ObjBuffer = ObjCache->getObject(&M); if (!ObjBuffer) - return {nullptr, nullptr}; + return object::OwningBinary(); ErrorOr> Obj = object::ObjectFile::createObjectFile(ObjBuffer->getMemBufferRef()); if (!Obj) - return {nullptr, nullptr}; + return object::OwningBinary(); return {std::move(*Obj), std::move(ObjBuffer)}; } diff --git a/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h b/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h index 03289ed70b1..eae8f7425ff 100644 --- a/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h +++ b/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h @@ -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)