[llvm] r245034 - [PM/AA] Remove two no-op overridden functions that just delegated to the

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 14 12:49:23 PDT 2015


I was actually surprised i didn't get a warning about that, and assumed it
was OK as a consequence...

I think it is OK, but not because you're wrong. I think you're right, and
we just happen to never, ever call these methods on anything but the base
class type, and so it doesn't "matter". Still, using declarations are
probably in order for sanity.

On Fri, Aug 14, 2015 at 11:07 AM David Blaikie <dblaikie at gmail.com> wrote:

> On Fri, Aug 14, 2015 at 1:39 AM, Chandler Carruth via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> Author: chandlerc
>> Date: Fri Aug 14 03:39:32 2015
>> New Revision: 245034
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=245034&view=rev
>> Log:
>> [PM/AA] Remove two no-op overridden functions that just delegated to the
>> base class anyways.
>>
>
> I imagine these might end up shadowed by the function of the same name in
> the derived class, and a "using base::func" might be needed to make sure
> they act as equal overloads on the derived type? (I saw a similar bit of
> code in another API yesterday)
>
>
>>
>> Modified:
>>     llvm/trunk/include/llvm/Analysis/GlobalsModRef.h
>>     llvm/trunk/include/llvm/Analysis/LibCallAliasAnalysis.h
>>
>> Modified: llvm/trunk/include/llvm/Analysis/GlobalsModRef.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/GlobalsModRef.h?rev=245034&r1=245033&r2=245034&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/include/llvm/Analysis/GlobalsModRef.h (original)
>> +++ llvm/trunk/include/llvm/Analysis/GlobalsModRef.h Fri Aug 14 03:39:32
>> 2015
>> @@ -98,10 +98,6 @@ public:
>>                      const MemoryLocation &LocB) override;
>>    ModRefInfo getModRefInfo(ImmutableCallSite CS,
>>                             const MemoryLocation &Loc) override;
>> -  ModRefInfo getModRefInfo(ImmutableCallSite CS1,
>> -                           ImmutableCallSite CS2) override {
>> -    return AliasAnalysis::getModRefInfo(CS1, CS2);
>> -  }
>>
>>    /// getModRefBehavior - Return the behavior of the specified function
>> if
>>    /// called from the specified call site.  The call site may be null in
>> which
>>
>> Modified: llvm/trunk/include/llvm/Analysis/LibCallAliasAnalysis.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LibCallAliasAnalysis.h?rev=245034&r1=245033&r2=245034&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/include/llvm/Analysis/LibCallAliasAnalysis.h (original)
>> +++ llvm/trunk/include/llvm/Analysis/LibCallAliasAnalysis.h Fri Aug 14
>> 03:39:32 2015
>> @@ -42,12 +42,6 @@ struct LibCallAliasAnalysis : public Fun
>>    ModRefInfo getModRefInfo(ImmutableCallSite CS,
>>                             const MemoryLocation &Loc) override;
>>
>> -  ModRefInfo getModRefInfo(ImmutableCallSite CS1,
>> -                           ImmutableCallSite CS2) override {
>> -    // TODO: Could compare two direct calls against each other if we
>> cared to.
>> -    return AliasAnalysis::getModRefInfo(CS1, CS2);
>> -  }
>> -
>>    void getAnalysisUsage(AnalysisUsage &AU) const override;
>>
>>    bool runOnFunction(Function &F) override;
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150814/5e2d44d9/attachment.html>


More information about the llvm-commits mailing list