[llvm] r252212 - Refactor: Simplify boolean conditional return statements in lib/llvm/ExecutionEngine/Orc

Alexander Kornienko via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 5 13:18:09 PST 2015


Author: alexfh
Date: Thu Nov  5 15:18:09 2015
New Revision: 252212

URL: http://llvm.org/viewvc/llvm-project?rev=252212&view=rev
Log:
Refactor: Simplify boolean conditional return statements in lib/llvm/ExecutionEngine/Orc

Patch by Richard Thomson!

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


Modified:
    llvm/trunk/lib/ExecutionEngine/Orc/IndirectionUtils.cpp

Modified: llvm/trunk/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/IndirectionUtils.cpp?rev=252212&r1=252211&r2=252212&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/Orc/IndirectionUtils.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/Orc/IndirectionUtils.cpp Thu Nov  5 15:18:09 2015
@@ -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) {




More information about the llvm-commits mailing list