Merge of r51073-51074 from use-diet branch.
Do not rely on std::swap<Use>, provide a (faster) member function instead.
This change is primarily necessitated by MSVC++'s incompatibility with
declaring std::swap<Use> to be a friend of Use.
Also contains some minor tweaks to Use inline functions,
to undo pointless changes that sneaked in with the last merge.
llvm-svn: 51078
diff --git a/llvm/lib/VMCore/Instructions.cpp b/llvm/lib/VMCore/Instructions.cpp
index cea496d..ff56560 100644
--- a/llvm/lib/VMCore/Instructions.cpp
+++ b/llvm/lib/VMCore/Instructions.cpp
@@ -1563,7 +1563,7 @@
bool BinaryOperator::swapOperands() {
if (!isCommutative())
return true; // Can't commute operands
- std::swap(Op<0>(), Op<1>());
+ Op<0>().swap(Op<1>());
return false;
}