[RuntimeDyld] Make RuntimeDyld honor the ProcessAllSections flag.
authorLang Hames <lhames@gmail.com>
Tue, 4 Apr 2017 17:03:49 +0000 (17:03 +0000)
committerLang Hames <lhames@gmail.com>
Tue, 4 Apr 2017 17:03:49 +0000 (17:03 +0000)
commitd22badef45b001389bb584350a855c82b3157812
treeaade7205975090818b9409571495a1f5040258bd
parentac618383e3507d21d5b451f121a6123bb8084326
[RuntimeDyld] Make RuntimeDyld honor the ProcessAllSections flag.

When the ProcessAllSections flag (introduced in r204398) is set RuntimeDyld is
supposed to make a call to the client's memory manager for every section in each
object that is loaded. Due to some missing checks, this was not happening in all
cases. This patch adds the missing cases, and fixes the Orc unit test that
verifies correct behavior for ProcessAllSections (The unit test had been
silently bailing out due to an ordering issue: a change in the test order meant
that this unit-test was running before the native target was registered. This
issue has also been fixed in this patch).

This fixes <rdar://problem/22789965>

llvm-svn: 299449
llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.cpp
llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.h
llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp