diff options
author | Alexandros Lamprineas <alexandros.lamprineas@arm.com> | 2015-10-05 12:45:10 +0000 |
---|---|---|
committer | Alexandros Lamprineas <alexandros.lamprineas@arm.com> | 2015-10-05 12:45:10 +0000 |
commit | eda554a9b426f456366b41d53e1d85d879da1026 (patch) | |
tree | d1f8907fa36cad2141af828c860044b0a371d9f5 /clang/lib | |
parent | bb9c116165644db4f61b6cca67af050dda91f838 (diff) | |
download | bcm5719-llvm-eda554a9b426f456366b41d53e1d85d879da1026.tar.gz bcm5719-llvm-eda554a9b426f456366b41d53e1d85d879da1026.zip |
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
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Basic/Targets.cpp | 4 | ||||
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index 87ecc57b0d7..4397c7a677f 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -4452,10 +4452,6 @@ public: if (Feature[0] == '+') Features[Feature+1] = true; - if (ArchVersion < 6 || - (ArchVersion == 6 && ArchProfile == llvm::ARM::PK_M)) - Features["strict-align"] = true; - return TargetInfo::initFeatureMap(Features, Diags, CPU, FeaturesVec); } diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 1b42ff70f2b..649f90784e9 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -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) |