Add AutoUpgrade function to add new address space datalayout string to existing datalayouts.
Summary: Add function to AutoUpgrade to change the datalayout of old X86 datalayout strings. This adds "-p270:32:32-p271:32:32-p272:64:64" to X86 datalayouts that are otherwise valid and don't already contain it. This also removes the compatibility changes in https://reviews.llvm.org/D66843. Datalayout change in https://reviews.llvm.org/D64931. Reviewers: rnk, echristo Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67631 llvm-svn: 372267
This commit is contained in:
@@ -3648,6 +3648,11 @@ Error BitcodeReader::parseModule(uint64_t ResumeBit,
|
||||
break;
|
||||
}
|
||||
Record.clear();
|
||||
|
||||
// Upgrade data layout string.
|
||||
std::string DL = llvm::UpgradeDataLayoutString(
|
||||
TheModule->getDataLayoutStr(), TheModule->getTargetTriple());
|
||||
TheModule->setDataLayout(DL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user