Mark SymbolBody::getSymbol as `const`.
authorSean Silva <chisophugis@gmail.com>
Tue, 22 Mar 2016 21:04:03 +0000 (21:04 +0000)
committerSean Silva <chisophugis@gmail.com>
Tue, 22 Mar 2016 21:04:03 +0000 (21:04 +0000)
llvm-svn: 264094

lld/ELF/Symbols.h

index 6c869f6..d6bd0eb 100644 (file)
@@ -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