aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-03-15 00:55:51 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-03-15 00:55:51 +0000
commit377c7f049de15ba1541e2881ed1ece386048149e (patch)
treeb5fcedc7b5723b8225aba72955678c981cf1ff1c /lib/Analysis
parent0e33d9fea245d67f71a7f7138c8094a9c809613e (diff)
downloadexternal_llvm-377c7f049de15ba1541e2881ed1ece386048149e.zip
external_llvm-377c7f049de15ba1541e2881ed1ece386048149e.tar.gz
external_llvm-377c7f049de15ba1541e2881ed1ece386048149e.tar.bz2
Make the swap code here a bit more obvious what its doing... We're
essentially sorting the pair's arguments. I'd love to actually call sort here, but I'm just not that crazy. ;] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152764 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/InlineCost.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/InlineCost.cpp b/lib/Analysis/InlineCost.cpp
index 37aa729..3754e92 100644
--- a/lib/Analysis/InlineCost.cpp
+++ b/lib/Analysis/InlineCost.cpp
@@ -435,7 +435,7 @@ void InlineCostAnalyzer::FunctionInfo::countCodeReductionForPointerPair(
if (ArgIt == PointerArgs.end())
continue;
std::pair<unsigned, unsigned> ArgPair(ArgIt->second, ArgIdx);
- if (ArgIt->second > ArgIdx)
+ if (ArgPair.first > ArgPair.second)
std::swap(ArgPair.first, ArgPair.second);
PointerArgPairWeights[ArgPair]