Use a stable sort to guarantee target feature ordering in the IR
in order to make testing somewhat more feasible. Has the advantage
of making it easier to find target features as well.
llvm-svn: 241134
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 245b827..fd20bf1 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -1544,6 +1544,7 @@
if (TargetCPU != "")
FuncAttrs.addAttribute("target-cpu", TargetCPU);
if (!Features.empty()) {
+ std::stable_sort(Features.begin(), Features.end());
std::stringstream TargetFeatures;
std::copy(Features.begin(), Features.end(),
std::ostream_iterator<std::string>(TargetFeatures, ","));