diff options
author | Eugene Zelenko <eugene.zelenko@gmail.com> | 2016-02-02 18:20:45 +0000 |
---|---|---|
committer | Eugene Zelenko <eugene.zelenko@gmail.com> | 2016-02-02 18:20:45 +0000 |
commit | ecefe5a81fd01922185afdd4f47e8ff231e34a81 (patch) | |
tree | ccec2ae513d2b045e7269505776ed1e6300a0f89 /llvm/lib/IR | |
parent | 7a2a5ce0589f8ac9b5c6ca8e7bf202061f7565aa (diff) | |
download | bcm5719-llvm-ecefe5a81fd01922185afdd4f47e8ff231e34a81.tar.gz bcm5719-llvm-ecefe5a81fd01922185afdd4f47e8ff231e34a81.zip |
Fix Clang-tidy readability-redundant-control-flow warnings; other minor fixes.
Differential revision: http://reviews.llvm.org/D16793
llvm-svn: 259539
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r-- | llvm/lib/IR/GCOV.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/IR/Value.cpp | 8 |
2 files changed, 5 insertions, 7 deletions
diff --git a/llvm/lib/IR/GCOV.cpp b/llvm/lib/IR/GCOV.cpp index fd6ebcabc8e..5cce9624009 100644 --- a/llvm/lib/IR/GCOV.cpp +++ b/llvm/lib/IR/GCOV.cpp @@ -22,6 +22,7 @@ #include "llvm/Support/raw_ostream.h" #include <algorithm> #include <system_error> + using namespace llvm; //===----------------------------------------------------------------------===// @@ -496,7 +497,7 @@ public: OS << format("%5u:", LineNum) << Line << "\n"; } }; -} +} // end anonymous namespace /// Convert a path to a gcov filename. If PreservePaths is true, this /// translates "/" to "#", ".." to "^", and drops ".", to match gcov. @@ -683,7 +684,6 @@ void FileInfo::print(raw_ostream &InfoOS, StringRef MainFilename, if (Options.FuncCoverage) printFuncCoverage(InfoOS); printFileCoverage(InfoOS); - return; } /// printFunctionSummary - Print function and block summary. diff --git a/llvm/lib/IR/Value.cpp b/llvm/lib/IR/Value.cpp index eb9deb6a07e..250f451b6b4 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 @@ static bool contains(Value *Expr, Value *V) { 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 @@ void Value::replaceUsesOutsideBlock(Value *New, BasicBlock *BB) { continue; U.set(New); } - return; } namespace { @@ -463,7 +463,7 @@ static Value *stripPointerCastsAndOffsets(Value *V) { return V; } -} // namespace +} // end anonymous namespace Value *Value::stripPointerCasts() { return stripPointerCastsAndOffsets<PSK_ZeroIndicesAndAliases>(this); @@ -642,7 +642,6 @@ void ValueHandleBase::RemoveFromUseList() { } } - void ValueHandleBase::ValueIsDeleted(Value *V) { assert(V->HasValueHandle && "Should only be called if ValueHandles present"); @@ -699,7 +698,6 @@ void ValueHandleBase::ValueIsDeleted(Value *V) { } } - void ValueHandleBase::ValueIsRAUWd(Value *Old, Value *New) { assert(Old->HasValueHandle &&"Should only be called if ValueHandles present"); assert(Old != New && "Changing value into itself!"); |