mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-13 19:40:26 +00:00

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> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299449 91177308-0d34-0410-b5e6-96231b3b80d8
26 lines
779 B
C++
26 lines
779 B
C++
//===--------- OrcTestCommon.cpp - Utilities for Orc Unit Tests -----------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Common utilities for Orc unit tests.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "OrcTestCommon.h"
|
|
|
|
using namespace llvm;
|
|
|
|
bool OrcNativeTarget::NativeTargetInitialized = false;
|
|
|
|
ModuleBuilder::ModuleBuilder(LLVMContext &Context, StringRef Triple,
|
|
StringRef Name)
|
|
: M(new Module(Name, Context)) {
|
|
if (Triple != "")
|
|
M->setTargetTriple(Triple);
|
|
}
|