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. ;]
llvm-svn: 152764
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp
index 37aa729..3754e92 100644
--- a/llvm/lib/Analysis/InlineCost.cpp
+++ b/llvm/lib/Analysis/InlineCost.cpp
@@ -435,7 +435,7 @@
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]