[llvm] r227041 - OrcJIT: Avoid non-static initializers.
NAKAMURA Takumi
geek4civic at gmail.com
Sun Jan 25 03:41:49 PST 2015
Author: chapuni
Date: Sun Jan 25 05:41:49 2015
New Revision: 227041
URL: http://llvm.org/viewvc/llvm-project?rev=227041&view=rev
Log:
OrcJIT: Avoid non-static initializers.
Modified:
llvm/trunk/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h
llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h?rev=227041&r1=227040&r2=227041&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h Sun Jan 25 05:41:49 2015
@@ -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)};
}
Modified: llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h?rev=227041&r1=227040&r2=227041&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h (original)
+++ llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h Sun Jan 25 05:41:49 2015
@@ -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)
More information about the llvm-commits
mailing list