Remove redundant if test.
authorLang Hames <lhames@gmail.com>
Sun, 21 Sep 2014 17:21:56 +0000 (17:21 +0000)
committerLang Hames <lhames@gmail.com>
Sun, 21 Sep 2014 17:21:56 +0000 (17:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218220 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/RTDyldMemoryManager.cpp

index 3beb6bf..a84f880 100644 (file)
@@ -265,10 +265,7 @@ uint64_t RTDyldMemoryManager::getSymbolAddress(const std::string &Name) {
 
   // 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,