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.)
This commit is contained in:
Matt Pharr
2012-07-07 15:09:35 -07:00
parent 57f0cf30c0
commit 1dc4424a30

View File

@@ -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,