]> granicus.if.org Git - clang/commitdiff
Set target data layout info in module.
authorChris Lattner <sabre@nondot.org>
Thu, 13 Dec 2007 17:34:31 +0000 (17:34 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 13 Dec 2007 17:34:31 +0000 (17:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45003 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/ASTConsumers.cpp

index 332f589f05a1e38829dfba30eb3a048ccdc6871b..41d73ec289f86b4d92e958cb51b1b3d4d6f591dd 100644 (file)
@@ -570,6 +570,7 @@ namespace {
       Ctx = &Context;
       M = new llvm::Module("foo");
       M->setTargetTriple(Ctx->Target.getTargetTriple());
+      M->setDataLayout(Ctx->Target.getTargetDescription());
       TD = new llvm::TargetData(Ctx->Target.getTargetDescription());
       Builder = CodeGen::Init(Context, Features, *M, *TD, Diags);
     }