Remove the TargetMachine forwards for TargetSubtargetInfo based
[oota-llvm.git] / tools / llc / llc.cpp
index 09ff4613b9720bc526dd5a7d98408f2fc8e665c5..01196d5c819dfedf652c8abd59fa0622ed8a746d 100644 (file)
@@ -41,6 +41,7 @@
 #include "llvm/Support/ToolOutputFile.h"
 #include "llvm/Target/TargetLibraryInfo.h"
 #include "llvm/Target/TargetMachine.h"
+#include "llvm/Target/TargetSubtargetInfo.h"
 #include <memory>
 using namespace llvm;
 
@@ -317,7 +318,7 @@ static int compileModule(char **argv, LLVMContext &Context) {
   PM.add(TLI);
 
   // Add the target data from the target machine, if it exists, or the module.
-  if (const DataLayout *DL = Target.getDataLayout())
+  if (const DataLayout *DL = Target.getSubtargetImpl()->getDataLayout())
     mod->setDataLayout(DL);
   PM.add(new DataLayoutPass(mod));