Updates for LLVM merge to r171906 on 20130108.
Change-Id: I368d0dc4be75cd03b4829e9ca76edc51782a1b0d
diff --git a/tools/llvm-mcld/llvm-mcld.cpp b/tools/llvm-mcld/llvm-mcld.cpp
index e7a48d0..fc0b99f 100644
--- a/tools/llvm-mcld/llvm-mcld.cpp
+++ b/tools/llvm-mcld/llvm-mcld.cpp
@@ -22,11 +22,12 @@
#include <mcld/LD/DiagnosticLineInfo.h>
#include <mcld/LD/TextDiagnosticPrinter.h>
-#include <llvm/Module.h>
#include <llvm/PassManager.h>
#include <llvm/Pass.h>
+#include <llvm/IR/Module.h>
+#include <llvm/IR/DataLayout.h>
+#include <llvm/IR/LLVMContext.h>
#include <llvm/ADT/Triple.h>
-#include <llvm/LLVMContext.h>
#include <llvm/MC/SubtargetFeature.h>
#include <llvm/Support/CommandLine.h>
#include <llvm/Support/Debug.h>
@@ -38,7 +39,6 @@
#include <llvm/Support/TargetRegistry.h>
#include <llvm/Support/TargetSelect.h>
#include <llvm/Support/Process.h>
-#include <llvm/Target/TargetData.h>
#include <llvm/Target/TargetMachine.h>
#if defined(HAVE_UNISTD_H)
@@ -1291,11 +1291,11 @@
// Build up all of the passes that we want to do to the module.
PassManager PM;
- // Add the target data from the target machine, if it exists, or the module.
- if (const TargetData *TD = TheTargetMachine.getTM().getTargetData())
- PM.add(new TargetData(*TD));
- else
- PM.add(new TargetData(&mod));
+ // Add the data layout from the target machine, if it exists, or the module.
+ if (const DataLayout *DL = TheTargetMachine.getTM().getDataLayout())
+ PM.add(new DataLayout(*DL));
+ else
+ PM.add(new DataLayout(&mod));
// Override default to generate verbose assembly.
TheTargetMachine.getTM().setAsmVerbosityDefault(true);