Refactor: Simplify boolean conditional return statements in lib/llvm/ExecutionEngine/Orc
authorAlexander Kornienko <alexfh@google.com>
Thu, 5 Nov 2015 21:18:09 +0000 (21:18 +0000)
committerAlexander Kornienko <alexfh@google.com>
Thu, 5 Nov 2015 21:18:09 +0000 (21:18 +0000)
Patch by Richard Thomson!

Differential revision: http://reviews.llvm.org/D9973

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252212 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/Orc/IndirectionUtils.cpp

index 5b1eccd..30dbe03 100644 (file)
@@ -64,9 +64,7 @@ class GlobalRenamer {
 public:
 
   static bool needsRenaming(const Value &New) {
-    if (!New.hasName() || New.getName().startswith("\01L"))
-      return true;
-    return false;
+    return !New.hasName() || New.getName().startswith("\01L");
   }
 
   const std::string& getRename(const Value &Orig) {