[llvm] r218220 - Remove redundant if test.

Lang Hames lhames at gmail.com
Tue Sep 23 11:19:59 PDT 2014


No - it's still valid, since SearchForAddress can return zero.

- Lang.

On Tue, Sep 23, 2014 at 11:12 AM, Duncan P. N. Exon Smith <
dexonsmith at apple.com> wrote:

>
> > 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?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140923/c2e75e2a/attachment.html>


More information about the llvm-commits mailing list