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

Richard legalize at xmission.com
Sun May 24 23:58:02 PDT 2015


Hi lhames, chapuni, alexfh,

Use clang-tidy to simplify boolean conditional return statements

http://reviews.llvm.org/D9973

Files:
  lib/ExecutionEngine/Orc/IndirectionUtils.cpp

Index: lib/ExecutionEngine/Orc/IndirectionUtils.cpp
===================================================================
--- lib/ExecutionEngine/Orc/IndirectionUtils.cpp
+++ lib/ExecutionEngine/Orc/IndirectionUtils.cpp
@@ -63,9 +63,7 @@
 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) {

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9973.26399.patch
Type: text/x-patch
Size: 520 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150525/ab158768/attachment.bin>


More information about the llvm-commits mailing list