[JIT] TrivialMemoryManager: Fail if we can't allocate memory.
authorDavide Italiano <davide@freebsd.org>
Thu, 15 Oct 2015 00:05:32 +0000 (00:05 +0000)
committerDavide Italiano <davide@freebsd.org>
Thu, 15 Oct 2015 00:05:32 +0000 (00:05 +0000)
commitd88454bff79d67ad786dfea850523100f110c8a8
treebececac3c2b267dea80433559bbbdea03c729bdc
parent82dd03ed9db110527130c027c570e03a7d238836
[JIT] TrivialMemoryManager: Fail if we can't allocate memory.

TrivialMemoryManager currently doesn't check the return type of AllocateRWX --
and returns a 'null' MemoryBlock to its caller. As pointed out by Lang,
this exposes some serious issues with the MemoryManager interface. There's,
in fact, no way to report back an error to clients rather than aborting in
case memory can't be allocated. Eventually the interface will grow to support
this, but for now, fail sooner rather than later.

Differential Revision: http://reviews.llvm.org/D13627

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250350 91177308-0d34-0410-b5e6-96231b3b80d8
tools/llvm-rtdyld/llvm-rtdyld.cpp