[llvm] r218220 - Remove redundant if test.
Duncan P. N. Exon Smith
dexonsmith at apple.com
Tue Sep 23 11:29:33 PDT 2014
This is awkward; I misread the patch as:
+ return 0;
> On 2014-Sep-23, at 11:19, Lang Hames <lhames at gmail.com> wrote:
>
> 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?
>
More information about the llvm-commits
mailing list