From 1dc4424a3009f43af660bb8ef6798f8db29b3f13 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Sat, 7 Jul 2012 15:09:35 -0700 Subject: [PATCH] Only override module datalayout for generic targets. Doing it for all targets was causing a number of tests to fail. (Actual root cause not determined.) --- builtins.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builtins.cpp b/builtins.cpp index b2fb64c2..00f72fc8 100644 --- a/builtins.cpp +++ b/builtins.cpp @@ -625,7 +625,8 @@ AddBitcodeToModule(const unsigned char *bitcode, int length, // targets having a layout with 16-bit alignment for 16xi1 vectors. // As long as builtins-c.c doesn't have any 16xi1 vector types // (which it shouldn't!), then this override is safe. - bcModule->setDataLayout(module->getDataLayout()); + if (g->target.isa == Target::GENERIC) + bcModule->setDataLayout(module->getDataLayout()); std::string(linkError); if (llvm::Linker::LinkModules(module, bcModule,