The Driver does not set the +strict-align flag when targeting

[ARM] armv6m + netbsd. Tests are misssing for armv6m + darwin as well.

Differential Revision: http://reviews.llvm.org/D13217

llvm-svn: 249308
This commit is contained in:
Alexandros Lamprineas
2015-10-05 12:45:10 +00:00
parent bb9c116165
commit eda554a9b4
3 changed files with 8 additions and 5 deletions

View File

@@ -834,7 +834,8 @@ static void getARMTargetFeatures(const ToolChain &TC,
// The above behavior is consistent with GCC.
int VersionNum = getARMSubArchVersionNumber(Triple);
if (Triple.isOSDarwin() || Triple.isOSNetBSD()) {
if (VersionNum < 6)
if (VersionNum < 6 ||
Triple.getSubArch() == llvm::Triple::SubArchType::ARMSubArch_v6m)
Features.push_back("+strict-align");
} else if (Triple.isOSLinux() || Triple.isOSNaCl()) {
if (VersionNum < 7)