Merge remote-tracking branch 'origin/master' into master-next

This commit is contained in:
swift-ci
2017-06-30 13:09:12 -07:00
2 changed files with 11 additions and 1 deletions

View File

@@ -796,9 +796,11 @@ void IRGenModule::constructInitialFnAttributes(llvm::AttrBuilder &Attrs) {
if (CPU != "")
Attrs.addAttribute("target-cpu", CPU);
std::vector<std::string> &Features = ClangOpts.Features;
std::vector<std::string> Features = ClangOpts.Features;
if (!Features.empty()) {
SmallString<64> allFeatures;
// Sort so that the target features string is canonical.
std::sort(Features.begin(), Features.end());
interleave(Features, [&](const std::string &s) {
allFeatures.append(s);
}, [&]{