Expected<std::unique_ptr<Session>> Session::Create(Triple TT) {
- auto PageSize = sys::Process::getPageSize();
- if (!PageSize)
- return PageSize.takeError();
-
std::unique_ptr<ExecutorProcessControl> EPC;
if (OutOfProcessExecutor.getNumOccurrences()) {
/// If -oop-executor is passed then launch the executor.
return REPC.takeError();
} else {
/// Otherwise use SelfExecutorProcessControl to target the current process.
+ auto PageSize = sys::Process::getPageSize();
+ if (!PageSize)
+ return PageSize.takeError();
EPC = std::make_unique<SelfExecutorProcessControl>(
std::make_shared<SymbolStringPool>(), std::move(TT), *PageSize,
createMemoryManager());