mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
IRGen: Sort the target-features string
Function merging will not identify two otherwise equivalent if the order of the target-features list differs. rdar://33057710
This commit is contained in:
@@ -817,6 +817,8 @@ llvm::AttributeSet IRGenModule::constructInitialAttributes() {
|
||||
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);
|
||||
}, [&]{
|
||||
|
||||
Reference in New Issue
Block a user