[llvm] r218220 - Remove redundant if test.

Duncan P. N. Exon Smith dexonsmith at apple.com
Tue Sep 23 11:12:00 PDT 2014


> On 2014-Sep-21, at 10:21, Lang Hames <lhames at gmail.com> wrote:
> 
> 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,
> 

Should that comment be removed too?



More information about the llvm-commits mailing list