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.

llvm-svn: 28074
diff --git a/llvm/lib/ExecutionEngine/JIT/JIT.cpp b/llvm/lib/ExecutionEngine/JIT/JIT.cpp
index 4d3b5a3..91c8caf 100644
--- a/llvm/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/llvm/lib/ExecutionEngine/JIT/JIT.cpp
@@ -302,8 +302,8 @@
     // actually initialize the global after current function has finished
     // compilation.
     const Type *GlobalType = GV->getType()->getElementType();
-    size_t S = getTargetData().getTypeSize(GlobalType);
-    size_t A = getTargetData().getTypeAlignment(GlobalType);
+    size_t S = getTargetData()->getTypeSize(GlobalType);
+    size_t A = getTargetData()->getTypeAlignment(GlobalType);
     if (A <= 8) {
       Ptr = malloc(S);
     } else {