Fix Clang-tidy readability-redundant-control-flow warnings; other minor fixes.
Differential revision: http://reviews.llvm.org/D16793
llvm-svn: 259539
diff --git a/llvm/lib/IR/Value.cpp b/llvm/lib/IR/Value.cpp
index eb9deb6..250f451 100644
--- a/llvm/lib/IR/Value.cpp
+++ b/llvm/lib/IR/Value.cpp
@@ -34,6 +34,7 @@
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
+
using namespace llvm;
//===----------------------------------------------------------------------===//
@@ -356,7 +357,7 @@
SmallPtrSet<ConstantExpr *, 4> Cache;
return contains(Cache, CE, C);
}
-#endif
+#endif // NDEBUG
void Value::replaceAllUsesWith(Value *New) {
assert(New && "Value::replaceAllUsesWith(<null>) is invalid!");
@@ -408,7 +409,6 @@
continue;
U.set(New);
}
- return;
}
namespace {
@@ -463,7 +463,7 @@
return V;
}
-} // namespace
+} // end anonymous namespace
Value *Value::stripPointerCasts() {
return stripPointerCastsAndOffsets<PSK_ZeroIndicesAndAliases>(this);
@@ -642,7 +642,6 @@
}
}
-
void ValueHandleBase::ValueIsDeleted(Value *V) {
assert(V->HasValueHandle && "Should only be called if ValueHandles present");
@@ -699,7 +698,6 @@
}
}
-
void ValueHandleBase::ValueIsRAUWd(Value *Old, Value *New) {
assert(Old->HasValueHandle &&"Should only be called if ValueHandles present");
assert(Old != New && "Changing value into itself!");