[llvm] r218220 - Remove redundant if test.

Lang Hames lhames at gmail.com
Sun Sep 21 10:21:59 PDT 2014


Author: lhames
Date: Sun Sep 21 12:21:56 2014
New Revision: 218220

URL: http://llvm.org/viewvc/llvm-project?rev=218220&view=rev
Log:
Remove redundant if test.


Modified:
    llvm/trunk/lib/ExecutionEngine/RTDyldMemoryManager.cpp

Modified: llvm/trunk/lib/ExecutionEngine/RTDyldMemoryManager.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RTDyldMemoryManager.cpp?rev=218220&r1=218219&r2=218220&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RTDyldMemoryManager.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/RTDyldMemoryManager.cpp Sun Sep 21 12:21:56 2014
@@ -265,10 +265,7 @@ uint64_t RTDyldMemoryManager::getSymbolA
 
   // If we Name did not require demangling, or we failed to find the demangled
   // name, try again without demangling.
-  if (void *Ptr = sys::DynamicLibrary::SearchForAddressOfSymbol(NameStr))
-    return (uint64_t)Ptr;
-
-  return 0;
+  return (uint64_t)sys::DynamicLibrary::SearchForAddressOfSymbol(NameStr);
 }
 
 void *RTDyldMemoryManager::getPointerToNamedFunction(const std::string &Name,





More information about the llvm-commits mailing list