[llvm] r189279 - Fix thinko.

Peter Collingbourne peter at pcc.me.uk
Mon Aug 26 14:36:21 PDT 2013


On Mon, Aug 26, 2013 at 02:12:55PM -0700, David Blaikie wrote:
> On Mon, Aug 26, 2013 at 1:58 PM, Eric Christopher <echristo at gmail.com> wrote:
> > Author: echristo
> > Date: Mon Aug 26 15:58:35 2013
> > New Revision: 189279
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=189279&view=rev
> > Log:
> > Fix thinko.
> >
> > Modified:
> >     llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
> >
> > Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
> > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=189279&r1=189278&r2=189279&view=diff
> > ==============================================================================
> > --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
> > +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Aug 26 15:58:35 2013
> > @@ -210,7 +210,7 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Mo
> >    if (DwarfAccelTables == Default)
> >      HasDwarfAccelTables = IsDarwin;
> >    else
> > -    HasDwarfAccelTables = DwarfAccelTables = Enable;
> > +    HasDwarfAccelTables = DwarfAccelTables == Enable;
> 
> We were just talking earlier today about adding a warning for this
> sort of thing...
> 
> (specifically it came up in:
> 
> struct foo {
>   int m;
>   bool operator==(const foo& f) {

Perhaps the lack of a const qualifier on this (or a mismatch in
cv-qualifiers between the operands) would be sufficient to emit
a warning?

Thanks,
-- 
Peter



More information about the llvm-commits mailing list