diff options
author | Chris Lattner <sabre@nondot.org> | 2006-05-04 21:18:40 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-05-04 21:18:40 +0000 |
commit | b93b0347d8715e9f2ded1dc56a086f92aeedfb86 (patch) | |
tree | fdacba9d4159ed7f6a53e1d0379048d658b6ee59 | |
parent | ed5b016f0ecd232647b9ea9cb54bf2768d55d690 (diff) |
Adjust to use proper TargetData copy ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28112 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/ExecutionEngine/JIT/JIT.cpp | 2 | ||||
-rw-r--r-- | tools/llc/llc.cpp | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp index 91c8caf50c..7262739e92 100644 --- a/lib/ExecutionEngine/JIT/JIT.cpp +++ b/lib/ExecutionEngine/JIT/JIT.cpp @@ -47,7 +47,7 @@ JIT::JIT(ModuleProvider *MP, TargetMachine &tm, TargetJITInfo &tji) // Add target data MutexGuard locked(lock); FunctionPassManager& PM = state.getPM(locked); - PM.add(new TargetData(TM.getTargetData())); + PM.add(new TargetData(*TM.getTargetData())); // Compile LLVM Code down to machine code in the intermediate representation TJI.addPassesToJITCompile(PM); diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index 4d36e837e8..1df22ac0c7 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -143,11 +143,10 @@ int main(int argc, char **argv) { std::auto_ptr<TargetMachine> target(MArch->CtorFn(mod, FeaturesStr)); assert(target.get() && "Could not allocate target machine!"); TargetMachine &Target = *target.get(); - const TargetData *TD = Target.getTargetData(); // Build up all of the passes that we want to do to the module... PassManager Passes; - Passes.add(new TargetData(TD)); + Passes.add(new TargetData(*Target.getTargetData())); #ifndef NDEBUG if(!NoVerify) |