Move TargetData to DataLayout.
llvm-svn: 165395
This commit is contained in:
@@ -21,14 +21,14 @@
|
||||
#include "clang/Basic/TargetInfo.h"
|
||||
#include "llvm/LLVMContext.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
#include "llvm/DataLayout.h"
|
||||
#include "llvm/ADT/OwningPtr.h"
|
||||
using namespace clang;
|
||||
|
||||
namespace {
|
||||
class CodeGeneratorImpl : public CodeGenerator {
|
||||
DiagnosticsEngine &Diags;
|
||||
OwningPtr<const llvm::TargetData> TD;
|
||||
OwningPtr<const llvm::DataLayout> TD;
|
||||
ASTContext *Ctx;
|
||||
const CodeGenOptions CodeGenOpts; // Intentionally copied in.
|
||||
protected:
|
||||
@@ -54,7 +54,7 @@ namespace {
|
||||
|
||||
M->setTargetTriple(Ctx->getTargetInfo().getTriple().getTriple());
|
||||
M->setDataLayout(Ctx->getTargetInfo().getTargetDescription());
|
||||
TD.reset(new llvm::TargetData(Ctx->getTargetInfo().getTargetDescription()));
|
||||
TD.reset(new llvm::DataLayout(Ctx->getTargetInfo().getTargetDescription()));
|
||||
Builder.reset(new CodeGen::CodeGenModule(Context, CodeGenOpts,
|
||||
*M, *TD, Diags));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user