mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Refactor TargetMachine, pushing handling of TargetData into the target-specific subclasses. This has one caller-visible change: getTargetData() now returns a pointer instead of a reference.
This fixes PR 759. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28074 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -67,8 +67,8 @@ class ExecutionEngine {
|
||||
protected:
|
||||
ModuleProvider *MP;
|
||||
|
||||
void setTargetData(const TargetData &td) {
|
||||
TD = &td;
|
||||
void setTargetData(const TargetData *td) {
|
||||
TD = td;
|
||||
}
|
||||
|
||||
// To avoid having libexecutionengine depend on the JIT and interpreter
|
||||
@ -88,7 +88,7 @@ public:
|
||||
virtual ~ExecutionEngine();
|
||||
|
||||
Module &getModule() const { return CurMod; }
|
||||
const TargetData &getTargetData() const { return *TD; }
|
||||
const TargetData *getTargetData() const { return TD; }
|
||||
|
||||
/// create - This is the factory method for creating an execution engine which
|
||||
/// is appropriate for the current machine.
|
||||
|
Reference in New Issue
Block a user