[lld] r264094 - Mark SymbolBody::getSymbol as `const`.
Sean Silva via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 22 16:09:25 PDT 2016
On Tue, Mar 22, 2016 at 2:13 PM, Rui Ueyama <ruiu at google.com> wrote:
> This is not a bad change, but I'd appreciate if you write a sentence why
> you are making this change in the description.
>
Sure, I was thinking of doing that but in the end the change seemed so
simple as to not need it. I'll include it in the future. In this case, I
was adding some debug code somewhere that we had a `const SymbolBody` and
it was failing to compile (initially I was invoking it in the debugger and
even the debugger was complaining).
-- Sean Silva
>
> On Tue, Mar 22, 2016 at 10:04 PM, Sean Silva via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> Author: silvas
>> Date: Tue Mar 22 16:04:03 2016
>> New Revision: 264094
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=264094&view=rev
>> Log:
>> Mark SymbolBody::getSymbol as `const`.
>>
>> Modified:
>> lld/trunk/ELF/Symbols.h
>>
>> Modified: lld/trunk/ELF/Symbols.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.h?rev=264094&r1=264093&r2=264094&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/ELF/Symbols.h (original)
>> +++ lld/trunk/ELF/Symbols.h Tue Mar 22 16:04:03 2016
>> @@ -106,7 +106,7 @@ public:
>> // you can access P->Backref->Body to get the resolver's result.
>> void setBackref(Symbol *P) { Backref = P; }
>> SymbolBody &repl() { return Backref ? *Backref->Body : *this; }
>> - Symbol *getSymbol() { return Backref; }
>> + Symbol *getSymbol() const { return Backref; }
>>
>> // Decides which symbol should "win" in the symbol table, this or
>> // the Other. Returns 1 if this wins, -1 if the Other wins, or 0 if
>>
>>
>> _______________________________________________
>> 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/20160322/812e085a/attachment.html>
More information about the llvm-commits
mailing list