Add a TargetData to the PassManager regardless of the TargetMachine.
This should unbreak the Sparc JIT again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12949 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp
index 4426c67..3d4bc4c 100644
--- a/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/lib/ExecutionEngine/JIT/JIT.cpp
@@ -32,6 +32,9 @@
// Initialize MCE
MCE = createEmitter(*this);
+ // Add target data
+ PM.add (new TargetData (TM.getTargetData ()));
+
// Compile LLVM Code down to machine code in the intermediate representation
TJI.addPassesToJITCompile(PM);