From 2374a7cba8ea820f27c05e3f7f8f7f98d27c650d Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Wed, 1 Jul 2015 01:07:12 +0000 Subject: 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 --- clang/lib/CodeGen/CGCall.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/CodeGen/CGCall.cpp') diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 245b8274a90..fd20bf15e0d 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -1544,6 +1544,7 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, 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(TargetFeatures, ",")); -- cgit v1.2.3